From: Robin G. <rg...@bl...> - 2008-01-28 06:54:17
|
I was trying to use lemonlauncher (which seems pretty cool BTW) - but was having a little problem... In lemonmenu.cpp: void lemon_menu::handle_run() { game* g = (game*)_current->selected(); string cmd(g_opts.get_string(KEY_MAME_PATH)); log << info << "handle_run: launching game " << g->text() << endl; // this is required when lemon launcher is full screen for some reason // otherwise mame freezes and all the processes have to be kill manually bool full = g_opts.get_bool(KEY_FULLSCREEN); if (full) SDL_WM_ToggleFullScreen(_screen); size_t pos = cmd.find("%r"); if (pos == string::npos) throw bad_lemon("mame path missing %r specifier"); cmd.replace(pos, 2, g->rom()); log << debug << "handle_run: " << cmd << endl; system(cmd.c_str()); if (full) SDL_WM_ToggleFullScreen(_screen); // clear the event queue SDL_Event event; while (SDL_PollEvent(&event)); render(); } The problem (I think) is that SDL_WM_ToggleFullScreen is only supported on X11, not with /dev/fb http://linux.die.net/man/3/sdl_wm_togglefullscreen Does it make sense to check the return code - Returns 0 on failure or 1 on success - and do something else (although right now, I'm not sure what) if it fails? When I run it - I get the exact thing that the comment says - lemon launcher is full screen, mame freezes and all the processes have to be kill manually Any thoughts? -Robin |