@@ -152,6 +152,9 @@ int main(int argc, char *argv[])
152152 /* Init Signals */
153153 signal (SIGUSR1 , handle_sigusr1 );
154154
155+ /* Set env var for no mouse */
156+ putenv (strdup ("SDL_NOMOUSE=1" ));
157+
155158 plat_early_init ();
156159
157160 in_init ();
@@ -171,42 +174,42 @@ int main(int argc, char *argv[])
171174 if (emu_reload_rom (rom_fname_reload )) {
172175 engineState = PGS_Running ;
173176
174- /* Load slot */
175- if (load_state_slot != -1 ){
176- printf ("LOADING FROM SLOT %d...\n" , load_state_slot + 1 );
177- char fname [1024 ];
178- emu_save_load_game (1 , 0 );
179- printf ("LOADED FROM SLOT %d\n" , load_state_slot + 1 );
180- load_state_slot = -1 ;
181- }
182- /* Load file */
183- else if (load_state_file != NULL ){
184- printf ("LOADING FROM FILE %s...\n" , load_state_file );
185- emu_save_load_game_from_file (1 , load_state_file );
186- printf ("LOADED FROM SLOT %s\n" , load_state_file );
187- load_state_file = NULL ;
188- }
189- /* Load quick save file */
190- else if (access ( quick_save_file , F_OK ) != -1 ){
191- printf ("Found quick save file: %s\n" , quick_save_file );
192-
193- int resume = launch_resume_menu_loop ();
194- if (resume == RESUME_YES ){
195- printf ("Resume game from quick save file: %s\n" , quick_save_file );
196- emu_save_load_game_from_file (1 , quick_save_file );
197- }
198- else {
199- printf ("Reset game\n" );
200- }
201- }
202-
203- /* Remove quicksave file if present */
204- if ( remove ( quick_save_file ) == 0 ){
205- printf ( "Deleted successfully: %s\n" , quick_save_file );
206- }
207- else {
208- printf ( "Unable to delete the file: %s\n" , quick_save_file );
209- }
177+ /* Load slot */
178+ if (load_state_slot != -1 ){
179+ printf ("LOADING FROM SLOT %d...\n" , load_state_slot + 1 );
180+ char fname [1024 ];
181+ emu_save_load_game (1 , 0 );
182+ printf ("LOADED FROM SLOT %d\n" , load_state_slot + 1 );
183+ load_state_slot = -1 ;
184+ }
185+ /* Load file */
186+ else if (load_state_file != NULL ){
187+ printf ("LOADING FROM FILE %s...\n" , load_state_file );
188+ emu_save_load_game_from_file (1 , load_state_file );
189+ printf ("LOADED FROM SLOT %s\n" , load_state_file );
190+ load_state_file = NULL ;
191+ }
192+ /* Load quick save file */
193+ else if (access ( quick_save_file , F_OK ) != -1 ){
194+ printf ("Found quick save file: %s\n" , quick_save_file );
195+
196+ int resume = launch_resume_menu_loop ();
197+ if (resume == RESUME_YES ){
198+ printf ("Resume game from quick save file: %s\n" , quick_save_file );
199+ emu_save_load_game_from_file (1 , quick_save_file );
200+ }
201+ else {
202+ printf ("Reset game\n" );
203+
204+ /* Remove quicksave file if present */
205+ if ( remove ( quick_save_file ) == 0 ){
206+ printf ( "Deleted successfully: %s\n" , quick_save_file );
207+ }
208+ else {
209+ printf ( "Unable to delete the file: %s\n" , quick_save_file );
210+ }
211+ }
212+ }
210213 }
211214 }
212215
0 commit comments