From: Josh K. <jo...@sl...> - 2008-01-28 13:53:22
|
Robin, I've been having trouble with that bit of code actually. It's not very portable and seems to cause issues on different platforms/environments. That said, I don't think I need to check the return value from SDL_WM_ToggleFullScreen because that function call is ignored for everything except X11 environment. In the trunk I have some experimental code which uses the SDL threading functions to launch the mame process which again has some stability issues but it might be worth a try. The code in trunk actually uses sqlite for the games list so it introduces another dependency and currently there is no user friendly way to generate your database (coming very soon). I will try to setup a system today that uses the framebuffer with SDL and see if I can't come up with a patch to at least make this work for you. Regards, Josh On Mon, 28 Jan 2008 01:55:27 -0500, Robin Getz <rg...@bl...> wrote: > 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 > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Lemonlauncher-general mailing list > Lem...@li... > https://lists.sourceforge.net/lists/listinfo/lemonlauncher-general |