fixing some hgw related bugs and preparing release
authorJavier S. Pedro <maemo@javispedro.com>
Sun, 16 Aug 2009 17:24:56 +0000 (19:24 +0200)
committerJavier S. Pedro <maemo@javispedro.com>
Sun, 16 Aug 2009 17:24:56 +0000 (19:24 +0200)
debian/changelog
debian/control
debian/drnoksnes-default.ex [deleted file]
debian/links [new file with mode: 0644]
gui/drnoksnes.desktop.m4
gui/drnoksnes.startup.service.m4
platform/config.cpp
platform/hgw.cpp

index 4546bbd..e0ca55e 100644 (file)
@@ -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 <maemo@javispedro.com>  Sat, 15 Aug 2009 00:18:19 +0200
+ -- Javier S. Pedro <maemo@javispedro.com>  Sun, 16 Aug 2009 19:23:49 +0200
 
 drnoksnes (0.9.2) unstable; urgency=low
 
index 615c748..8f62ee8 100644 (file)
@@ -3,13 +3,15 @@ Section: user/games
 Priority: extra
 Maintainer: Javier S. Pedro <maemo@javispedro.com>
 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 (file)
index 4d4d13a..0000000
+++ /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 (file)
index 0000000..92bb2e9
--- /dev/null
@@ -0,0 +1,2 @@
+/usr/bin/osso_games_startup usr/bin/drnoksnes_startup
+/usr/bin/osso_games_startup.launch usr/bin/drnoksnes_startup.launch
index 9c860bd..a849326 100644 (file)
@@ -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
index ed005c3..efe1d9e 100644 (file)
@@ -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
index 4a186b5..55d86d4 100644 (file)
@@ -240,6 +240,7 @@ static void loadConfig(poptContext optCon, const char * file)
        poptStuffArgs(optCon, newargv);
 
        free(out);
+       fclose(fp);
        /* XXX: currently leaking newargv */
 }
 
index 9243f1b..1aad71b 100644 (file)
@@ -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);
        }
 }