void gui_ConfigMenuRun() { gui_MainMenuRun(&gui_ConfigMenu); osint_updatescale(); osint_gencolors(); }
int main(int argc, char *argv[] ) { char msg[1024]; FILE *cartfile; /* Information about the current video settings. */ const SDL_VideoInfo* info = NULL; // get defaults and parse command-line params if (osint_defaults ()) { return 1; } osint_parse_cmdline (argc, argv); cartfile = fopen (cartname, "rb"); if (cartfile != NULL) { fread (cart, 1, sizeof (cart), cartfile); fclose (cartfile); } else { sprintf (msg, "cannot open '%s'", cartname); fprintf(stderr, msg); } // Initialize SDL's video subsystem info = init_sdl(); //setup_opengl( width, height ); /* determine a set of colors to use based */ osint_gencolors (); #ifdef ENABLE_OVERLAY // Load overlay if neccessary (TGA 24-bit uncompressed) g_overlay.width = 0; if (overlayname) load_overlay(overlayname); #endif // set up audio buffering reqSpec.freq = 22050; // Audio frequency in samples per second reqSpec.format = AUDIO_U8; // Audio data format reqSpec.channels = 1; // Number of channels: 1 mono, 2 stereo reqSpec.samples = 441; // Audio buffer size in samples reqSpec.callback = fillsoundbuffer; // Callback function for filling the audio buffer reqSpec.userdata = NULL; usedSpec = &givenSpec; /* Open the audio device */ if ( SDL_OpenAudio(&reqSpec, usedSpec) < 0 ){ fprintf(stderr, "Couldn't open audio: %s\n", SDL_GetError()); exit(-1); } if(usedSpec == NULL) usedSpec = &reqSpec; // Start playing audio SDL_PauseAudio(0); /* message loop handler and emulator code */ osint_emuloop (); /* * Quit SDL so we can release the fullscreen * mode and restore the previous video settings, * etc. */ SDL_Quit( ); /* Exit program. */ exit( 0 ); return 0; // END OF MAIN!!! }