File tree 10 files changed +21
-14
lines changed
10 files changed +21
-14
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ void LockConsole(void);
44
44
void UnlockConsole (void );
45
45
void ToggleFS (); /* SDL */
46
46
47
- int LoadGame (const char * path );
47
+ int LoadGame (const char * path , bool silent = false );
48
48
int CloseGame (void );
49
49
int GUI_Init (int argc , char * * argv , int (* dofunc )(void ));
50
50
int GUI_Idle (void );
Original file line number Diff line number Diff line change @@ -275,12 +275,12 @@ static void DoArgs(int argc, char *argv[])
275
275
provides data necessary for the driver code(number of scanlines to
276
276
render, what virtual input devices to use, etc.).
277
277
*/
278
- int LoadGame (const char * path )
278
+ int LoadGame (const char * path , bool silent )
279
279
{
280
280
FCEUGI * tmp ;
281
281
282
282
CloseGame ();
283
- if (!(tmp = FCEUI_LoadGame (path ,1 )))
283
+ if (!(tmp = FCEUI_LoadGame (path ,1 , silent )))
284
284
return 0 ;
285
285
CurGame = tmp ;
286
286
ParseGI (tmp );
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ void LockConsole(void);
29
29
void UnlockConsole (void );
30
30
void ToggleFS (); /* SDL */
31
31
32
- int LoadGame (const char * path );
32
+ int LoadGame (const char * path , bool silent );
33
33
//int CloseGame(void);
34
34
35
35
void Giggles (int );
Original file line number Diff line number Diff line change @@ -206,10 +206,13 @@ DriverKill()
206
206
inited=0 ;
207
207
}
208
208
209
+ /* *
210
+ * Reloads last game
211
+ */
209
212
int reloadLastGame () {
210
213
std::string lastRom;
211
214
g_config->getOption (std::string (" SDL.LastOpenFile" ), &lastRom);
212
- return LoadGame (lastRom.c_str ());
215
+ return LoadGame (lastRom.c_str (), false );
213
216
}
214
217
215
218
/* *
@@ -218,7 +221,7 @@ int reloadLastGame() {
218
221
* provides data necessary for the driver code(number of scanlines to
219
222
* render, what virtual input devices to use, etc.).
220
223
*/
221
- int LoadGame (const char *path)
224
+ int LoadGame (const char *path, bool silent )
222
225
{
223
226
int gg_enabled, autoLoadDebug, autoOpenDebugger;
224
227
@@ -233,7 +236,7 @@ int LoadGame(const char *path)
233
236
234
237
FCEUI_SetGameGenie (gg_enabled);
235
238
236
- if (!FCEUI_LoadGame (path, 1 )) {
239
+ if (!FCEUI_LoadGame (path, 1 , silent )) {
237
240
return 0 ;
238
241
}
239
242
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ extern unsigned int gui_draw_area_height;
19
19
// global configuration object
20
20
extern Config * g_config ;
21
21
22
- int LoadGame (const char * path );
22
+ int LoadGame (const char * path , bool silent = false );
23
23
int CloseGame (void );
24
24
25
25
int fceuWrapperInit ( int argc , char * argv [] );
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ extern int dendy;
24
24
extern int pal_emulation ;
25
25
extern bool swapDuty ;
26
26
27
- int LoadGame (const char * path );
27
+ int LoadGame (const char * path , bool silent );
28
28
int CloseGame (void );
29
29
void FCEUD_Update (uint8 * XBuf , int32 * Buffer , int Count );
30
30
uint64 FCEUD_GetTime ();
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ void LockConsole(void);
29
29
void UnlockConsole (void );
30
30
void ToggleFS (); /* SDL */
31
31
32
- int LoadGame (const char * path );
32
+ int LoadGame (const char * path , bool silent );
33
33
//int CloseGame(void);
34
34
35
35
void Giggles (int );
Original file line number Diff line number Diff line change @@ -189,6 +189,9 @@ static void ShowUsage(char *prog)
189
189
190
190
}
191
191
192
+ /* *
193
+ * Reloads last game.
194
+ */
192
195
int reloadLastGame () {
193
196
std::string lastRom;
194
197
g_config->getOption (std::string (" SDL.LastOpenFile" ), &lastRom);
@@ -201,12 +204,12 @@ int reloadLastGame() {
201
204
* provides data necessary for the driver code(number of scanlines to
202
205
* render, what virtual input devices to use, etc.).
203
206
*/
204
- int LoadGame (const char *path)
207
+ int LoadGame (const char *path, bool silent )
205
208
{
206
209
if (isloaded){
207
210
CloseGame ();
208
211
}
209
- if (!FCEUI_LoadGame (path, 1 )) {
212
+ if (!FCEUI_LoadGame (path, 1 , silent )) {
210
213
return 0 ;
211
214
}
212
215
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ extern int dendy;
24
24
extern int pal_emulation ;
25
25
extern bool swapDuty ;
26
26
27
- int LoadGame (const char * path );
27
+ int LoadGame (const char * path , bool silent = false );
28
28
int CloseGame (void );
29
29
void FCEUD_Update (uint8 * XBuf , int32 * Buffer , int Count );
30
30
uint64 FCEUD_GetTime ();
Original file line number Diff line number Diff line change @@ -520,6 +520,7 @@ static int emu_getdir(lua_State *L) {
520
520
521
521
522
522
extern void ReloadRom (void );
523
+ extern int LoadGame (const char *, bool );
523
524
524
525
// emu.loadrom(string filename)
525
526
//
@@ -549,7 +550,7 @@ static int emu_loadrom(lua_State *L) {
549
550
const char *nameo2 = luaL_checkstring (L,1 );
550
551
char nameo[2048 ];
551
552
strncpy (nameo, nameo2, sizeof (nameo));
552
- if (!FCEUI_LoadGame (nameo, 0 , true )) {
553
+ if (!LoadGame (nameo, true )) {
553
554
extern void reloadLastGame ();
554
555
reloadLastGame ();
555
556
return 0 ;
You can’t perform that action at this time.
0 commit comments