git @ Cat's Eye Technologies linapple / 0dc486b
Moved code to autoboot into its own function to avoid code duplication. arlo authored 7 years ago T. Joseph Carter committed 3 years ago
1 changed file(s) with 15 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
379379 return DiskInsert(nDrive, szFileName, 0, 0);
380380 }
381381
382 //Sets the emulator to automatically boot, rather than load the flash screen on startup
383 void setAutoBoot ()
384 {
385 // autostart
386 SDL_Event user_ev;
387 user_ev.type = SDL_USEREVENT;
388 user_ev.user.code = 1; //restart?
389 SDL_PushEvent(&user_ev);
390 }
391
382392 //===========================================================================
383393 // Let us load main configuration from config file. Y_Y --bb
384394 void LoadConfiguration ()
473483 dwTmp = 0;
474484 LOAD(TEXT("Boot at Startup") ,&dwTmp); //
475485 if(dwTmp) {
476 // autostart
477 SDL_Event user_ev;
478 user_ev.type = SDL_USEREVENT;
479 user_ev.user.code = 1; //restart?
480 SDL_PushEvent(&user_ev);
486 // autostart
487 setAutoBoot();
481488 }
482489
483490 dwTmp = 0;
729736
730737 }
731738
739
732740 FILE *spMono, *spStereo;
733741
734742 //---------------------------------------------------------------------------
955963 if(bBoot)
956964 {
957965 // autostart
958 SDL_Event user_ev;
959 user_ev.type = SDL_USEREVENT;
960 user_ev.user.code = 1; //restart?
961 SDL_PushEvent(&user_ev);
962 bBoot = false;
966 setAutoBoot();
967 bBoot = false;
963968 }
964969
965970 JoyReset();