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 |
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 |
From: Robin G. <rg...@bl...> - 2008-01-28 14:25:24
|
On Mon 28 Jan 2008 08:50, Josh Kropf pondered: > 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. Which is why it doesn't work for me :) > 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. I just thought it would be a test of "does this work/Are you running in X11" but a more general fix would be better. > 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). Do I need to grab the entire trunk? or just patch that function? Seems like from the sql comment - patching that function with trunk code might be easier. -Robin |
From: Josh K. <jo...@sl...> - 2008-01-29 18:50:04
|
Robin, I've tried both a gentoo box and one with crux using the vesa framebuffer driver and I can't seem to repeat this bug. On both systems mame launches just fine, and when exited lemon launcher gets control again. Which framebuffer driver are you using? Regards, Josh On Mon, 28 Jan 2008 09:26:40 -0500, Robin Getz <rg...@bl...> wrote: > On Mon 28 Jan 2008 08:50, Josh Kropf pondered: >> 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. > > Which is why it doesn't work for me :) > >> 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. > > I just thought it would be a test of "does this work/Are you running in > X11" > but a more general fix would be better. > >> 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). > > Do I need to grab the entire trunk? or just patch that function? Seems > like > from the sql comment - patching that function with trunk code might be > easier. > > -Robin |
From: Robin G. <rg...@bl...> - 2008-01-29 22:17:52
|
On Tue 29 Jan 2008 13:49, Josh Kropf pondered: > Robin, > > I've tried both a gentoo box and one with crux using the vesa > framebuffer driver and I can't seem to repeat this bug. On > both systems mame launches just fine, and when exited lemon > launcher gets control again. > > Which framebuffer driver are you using? I'm using on on the Blackfin BF548. http://docs.blackfin.uclinux.org/doku.php?id=sharp_lq043t1dg01 If you want to try it out on that, I can send you one. -Robin |
From: Josh K. <jo...@sl...> - 2008-01-29 23:08:18
|
Sure, that would speed things up. On Tue, 29 Jan 2008 17:19:06 -0500, Robin Getz <rg...@bl...> wrote: > On Tue 29 Jan 2008 13:49, Josh Kropf pondered: >> Robin, >> >> I've tried both a gentoo box and one with crux using the vesa >> framebuffer driver and I can't seem to repeat this bug. On >> both systems mame launches just fine, and when exited lemon >> launcher gets control again. >> >> Which framebuffer driver are you using? > > I'm using on on the Blackfin BF548. > http://docs.blackfin.uclinux.org/doku.php?id=sharp_lq043t1dg01 > > If you want to try it out on that, I can send you one. > > -Robin |