From: Javier S. Pedro Date: Sun, 16 Aug 2009 17:24:56 +0000 (+0200) Subject: fixing some hgw related bugs and preparing release X-Git-Tag: drnoksnes_0_9_3~1 X-Git-Url: https://vcs.maemo.org/git/?a=commitdiff_plain;h=7bab34b66ac0806038e5df8d4a6d0d41ce205179;p=drnoksnes fixing some hgw related bugs and preparing release --- diff --git a/debian/changelog b/debian/changelog index 4546bbd..e0ca55e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ drnoksnes (0.9.3) unstable; urgency=low * SRAM save on exiting and every 15 minutes. + * New interface based on osso_games_startup. - -- Javier S. Pedro Sat, 15 Aug 2009 00:18:19 +0200 + -- Javier S. Pedro Sun, 16 Aug 2009 19:23:49 +0200 drnoksnes (0.9.2) unstable; urgency=low diff --git a/debian/control b/debian/control index 615c748..8f62ee8 100644 --- a/debian/control +++ b/debian/control @@ -3,13 +3,15 @@ Section: user/games Priority: extra Maintainer: Javier S. Pedro Build-Depends: debhelper (>= 5), pkg-config, maemo-version, m4, libsdl1.2-dev, - libx11-dev, x11proto-core-dev, libxsp-dev, libpopt-dev, zlib1g-dev + libx11-dev, x11proto-core-dev, libxsp-dev, libpopt-dev, zlib1g-dev, gnupg, + hildon-games-wrapper-dev, libosso-dev, osso-games-startup-dev, libhildonfm2-dev Standards-Version: 3.7.2 Package: drnoksnes Architecture: armel -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: ${shlibs:Depends}, ${misc:Depends}, osso-games-startup Pre-Depends: maemo-select-menu-location Description: Super Nintendo Entertainment System emulator - A Super NES emulator, currently without interface but plan on adding one. + A Super NES emulator. It allows you to play some games designed for the SNES + and Super Famicom Nintendo game systems on your tablet. diff --git a/debian/drnoksnes-default.ex b/debian/drnoksnes-default.ex deleted file mode 100644 index 4d4d13a..0000000 --- a/debian/drnoksnes-default.ex +++ /dev/null @@ -1,10 +0,0 @@ -# Defaults for drnoksnes initscript -# sourced by /etc/init.d/drnoksnes -# installed at /etc/default/drnoksnes by the maintainer scripts - -# -# This is a POSIX shell fragment -# - -# Additional options that are passed to the Daemon. -DAEMON_OPTS="" diff --git a/debian/links b/debian/links new file mode 100644 index 0000000..92bb2e9 --- /dev/null +++ b/debian/links @@ -0,0 +1,2 @@ +/usr/bin/osso_games_startup usr/bin/drnoksnes_startup +/usr/bin/osso_games_startup.launch usr/bin/drnoksnes_startup.launch diff --git a/gui/drnoksnes.desktop.m4 b/gui/drnoksnes.desktop.m4 index 9c860bd..a849326 100644 --- a/gui/drnoksnes.desktop.m4 +++ b/gui/drnoksnes.desktop.m4 @@ -3,7 +3,7 @@ Encoding=UTF-8 Version=GAME_VERSION Type=Application Name=DrNokSnes -Exec=/usr/bin/osso_games_startup GAME_CONF_PATH +Exec=/usr/bin/drnoksnes_startup GAME_CONF_PATH Icon=drnoksnes X-Window-Icon=drnoksnes X-Window-Icon-Dimmed=drnoksnes diff --git a/gui/drnoksnes.startup.service.m4 b/gui/drnoksnes.startup.service.m4 index ed005c3..efe1d9e 100644 --- a/gui/drnoksnes.startup.service.m4 +++ b/gui/drnoksnes.startup.service.m4 @@ -1,3 +1,3 @@ [D-BUS Service] Name=com.javispedro.drnoksnes.startup -Exec=/usr/bin/osso_games_startup GAME_CONF_PATH +Exec=/usr/bin/drnoksnes_startup GAME_CONF_PATH diff --git a/platform/config.cpp b/platform/config.cpp index 4a186b5..55d86d4 100644 --- a/platform/config.cpp +++ b/platform/config.cpp @@ -240,6 +240,7 @@ static void loadConfig(poptContext optCon, const char * file) poptStuffArgs(optCon, newargv); free(out); + fclose(fp); /* XXX: currently leaking newargv */ } diff --git a/platform/hgw.cpp b/platform/hgw.cpp index 9243f1b..1aad71b 100644 --- a/platform/hgw.cpp +++ b/platform/hgw.cpp @@ -18,6 +18,7 @@ static HgwContext *hgw; void HgwInit() { + // hildon-games-wrapper sets this env variable for itself. char* service = getenv("HGW_EXEC_SERVICE"); if (!service) { @@ -36,17 +37,15 @@ void HgwInit() hgwLaunched = true; HgwStartCommand cmd = hgw_context_get_start_command(hgw); // TODO Handle cmd in some way other than assuming HGW_COMM_RESTART - cmd; - - + printf("Loading in HGW mode\n"); } void HgwDeinit() { if (!hgwLaunched) return; - hgw_context_destroy(hgw, HGW_BYE_PAUSED); // TODO + hgw_context_destroy(hgw, HGW_BYE_INACTIVE); // TODO hgw = 0; } @@ -68,15 +67,15 @@ void HgwPollEvents() { if (!hgwLaunched) return; - HgwMessage *msg = 0; + HgwMessage msg; HgwMessageFlags flags = HGW_MSG_FLAG_NONE; - if ( hgw_msg_check_incoming(hgw, msg, flags) == HGW_ERR_COMMUNICATION ) { + if ( hgw_msg_check_incoming(hgw, &msg, flags) == HGW_ERR_COMMUNICATION ) { // Message Incoming, process msg - switch (msg->type) { + switch (msg.type) { case HGW_MSG_TYPE_CBREQ: - switch (msg->e_val) { + switch (msg.e_val) { case HGW_CB_QUIT: case HGW_CB_EXIT: Config.quitting = true; @@ -85,7 +84,7 @@ void HgwPollEvents() break; } - hgw_msg_free_data(msg); + hgw_msg_free_data(&msg); } }