From b5a2e787c604aa5a906051198224a890f73c8c26 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Mon, 5 Oct 2009 23:48:56 +0200 Subject: [PATCH] workaround for #5276 --- gui/drnoksnes.schemas.m4 | 1 + platform/hgw.cpp | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gui/drnoksnes.schemas.m4 b/gui/drnoksnes.schemas.m4 index 38ebd95..5179c20 100644 --- a/gui/drnoksnes.schemas.m4 +++ b/gui/drnoksnes.schemas.m4 @@ -59,6 +59,7 @@ /apps/maemo/drnoksnes/rom drnoksnes string + ROM to load diff --git a/platform/hgw.cpp b/platform/hgw.cpp index 4ee43e9..33f382e 100644 --- a/platform/hgw.cpp +++ b/platform/hgw.cpp @@ -23,20 +23,20 @@ void HgwInit() { // hildon-games-wrapper sets this env variable for itself. char* service = getenv("HGW_EXEC_SERVICE"); - + if (!service) { // Not launched from hildon-games-wrapper hgwLaunched = false; return; } - + hgw = hgw_context_init(); - + if (!hgw) { fprintf(stderr, "Error opening hgw context\n"); hgwLaunched = false; } - + hgwLaunched = true; printf("Loading in HGW mode\n"); } @@ -62,8 +62,9 @@ void HgwConfig() && strlen(romFile) > 0) { S9xSetRomFile(romFile); } else { - hgw_context_destroy(hgw, HGW_BYE_INACTIVE); - DIE("No Rom in Gconf!"); + printf("Exiting gracefully because there's no ROM in Gconf\n"); + HgwDeinit(); + exit(0); } char sound = FALSE; -- 1.7.9.5