[mupen64plus-core] 112/310: Imported Upstream version 1.99.4+82+34538de0d26b

Sven Eckelmann ecsv-guest at moszumanska.debian.org
Thu Nov 26 05:57:31 UTC 2015


This is an automated email from the git hooks/post-receive script.

ecsv-guest pushed a commit to branch armhf_test
in repository mupen64plus-core.

commit f6c2ceab915026e330a65319d9e535cabf0eac8d
Author: Sven Eckelmann <sven at narfation.org>
Date:   Fri Sep 9 09:50:27 2011 +0200

    Imported Upstream version 1.99.4+82+34538de0d26b
---
 .../Mupen64Plus_v2.0_Core_Video_Extension.txt      |  4 ++--
 src/api/frontend.c                                 |  6 ++++--
 src/main/main.c                                    | 24 +++++++++++-----------
 src/osd/screenshot.cpp                             |  2 +-
 src/r4300/recomp.c                                 | 14 +++++--------
 tools/build_modules_src.sh                         |  2 +-
 6 files changed, 25 insertions(+), 27 deletions(-)

diff --git a/doc/emuwiki-api-doc/Mupen64Plus_v2.0_Core_Video_Extension.txt b/doc/emuwiki-api-doc/Mupen64Plus_v2.0_Core_Video_Extension.txt
index b2247e6..955b18d 100644
--- a/doc/emuwiki-api-doc/Mupen64Plus_v2.0_Core_Video_Extension.txt
+++ b/doc/emuwiki-api-doc/Mupen64Plus_v2.0_Core_Video_Extension.txt
@@ -18,7 +18,7 @@ All of these functions should only be called from within the video plugin; they
 |This function should be called before any other Video Extension functions.
 |-
 |Usage
-|This function should be called from within the InitiateGFX() video plugin function call.  The default SDL implementation of this function simply calls SDL_InitSubSystem(SDL_INIT_VIDEO).  It does not open a rendering window or switch video modes.
+|This function should be called from within the RomOpen() video plugin function call.  The default SDL implementation of this function simply calls SDL_InitSubSystem(SDL_INIT_VIDEO).  It does not open a rendering window or switch video modes.
 |}
 <br />
 {| border="1"
@@ -29,7 +29,7 @@ All of these functions should only be called from within the video plugin; they
 |N/A
 |-
 |Usage
-|This function closes any open rendering window and shuts down the video system.  The default SDL implementation of this function calls SDL_QuitSubSystem(SDL_INIT_VIDEO).  This function should be called from within the RomClose() video plugin function.
+|This function closes any open rendering window and shuts down the video system.  The default SDL implementation of this function calls SDL_QuitSubSystem(SDL_INIT_VIDEO).  This function should be called from within the RomClosed() video plugin function.
 |}
 <br />
 
diff --git a/src/api/frontend.c b/src/api/frontend.c
index d1c9368..7e3e410 100644
--- a/src/api/frontend.c
+++ b/src/api/frontend.c
@@ -26,6 +26,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
+#include <SDL.h>
 
 #define M64P_CORE_PROTOTYPES 1
 #include "m64p_types.h"
@@ -91,10 +92,11 @@ EXPORT m64p_error CALL CoreShutdown(void)
 
     /* close down some core sub-systems */
     romdatabase_close();
-
-    /* lastly, shut down the configuration code */
     ConfigShutdown();
 
+    /* tell SDL to shut down */
+    SDL_Quit();
+
     l_CoreInit = 0;
     return M64ERR_SUCCESS;
 }
diff --git a/src/main/main.c b/src/main/main.c
index e1963af..7e49112 100644
--- a/src/main/main.c
+++ b/src/main/main.c
@@ -108,9 +108,9 @@ void main_message(m64p_msg_level level, unsigned int corner, const char *format,
 
     /* send message to on-screen-display if enabled */
     if (ConfigGetParamBool(g_CoreConfig, "OnScreenDisplay"))
-        osd_new_message((enum osd_corner) corner, buffer);
+        osd_new_message((enum osd_corner) corner, "%s", buffer);
     /* send message to front-end */
-    DebugMessage(level, buffer);
+    DebugMessage(level, "%s", buffer);
 }
 
 
@@ -320,9 +320,9 @@ void main_draw_volume_osd(void)
 
     // create a new message or update an existing one
     if (l_msgVol != NULL)
-        osd_update_message(l_msgVol, msgString);
+        osd_update_message(l_msgVol, "%s", msgString);
     else {
-        l_msgVol = osd_new_message(OSD_MIDDLE_CENTER, msgString);
+        l_msgVol = osd_new_message(OSD_MIDDLE_CENTER, "%s", msgString);
 	osd_message_set_user_managed(l_msgVol);
     }
 }
@@ -521,9 +521,6 @@ m64p_error main_run(void)
     savestates_select_slot(ConfigGetParamInt(g_CoreConfig, "CurrentStateSlot"));
     no_compiled_jump = ConfigGetParamBool(g_CoreConfig, "NoCompiledJump");
 
-    /* set up the SDL key repeat and event filter to catch keyboard/joystick commands for the core */
-    event_initialize();
-
     // initialize memory, and do byte-swapping if it's not been done yet
     if (g_MemHasBeenBSwapped == 0)
     {
@@ -538,17 +535,21 @@ m64p_error main_run(void)
     // Attach rom to plugins
     if (!romOpen_gfx())
     {
-        free_memory(); SDL_Quit(); return M64ERR_PLUGIN_FAIL;
+        free_memory(); return M64ERR_PLUGIN_FAIL;
     }
     if (!romOpen_audio())
     {
-        romClosed_gfx(); free_memory(); SDL_Quit(); return M64ERR_PLUGIN_FAIL;
+        romClosed_gfx(); free_memory(); return M64ERR_PLUGIN_FAIL;
     }
     if (!romOpen_input())
     {
-        romClosed_audio(); romClosed_gfx(); free_memory(); SDL_Quit(); return M64ERR_PLUGIN_FAIL;
+        romClosed_audio(); romClosed_gfx(); free_memory(); return M64ERR_PLUGIN_FAIL;
     }
 
+    /* set up the SDL key repeat and event filter to catch keyboard/joystick commands for the core */
+    event_initialize();
+
+    /* initialize the on-screen display */
     if (ConfigGetParamBool(g_CoreConfig, "OnScreenDisplay"))
     {
         // init on-screen display
@@ -580,6 +581,7 @@ m64p_error main_run(void)
     r4300_reset_soft();
     r4300_execute();
 
+    /* now begin to shut down */
 #ifdef WITH_LIRC
     lircStop();
 #endif // WITH_LIRC
@@ -604,8 +606,6 @@ m64p_error main_run(void)
     g_EmulatorRunning = 0;
     StateChanged(M64CORE_EMU_STATE, M64EMU_STOPPED);
 
-    SDL_Quit();
-
     return M64ERR_SUCCESS;
 }
 
diff --git a/src/osd/screenshot.cpp b/src/osd/screenshot.cpp
index 2afb100..ac9d059 100644
--- a/src/osd/screenshot.cpp
+++ b/src/osd/screenshot.cpp
@@ -62,7 +62,7 @@ static void user_write_data(png_structp png_write, png_bytep data, png_size_t le
 {
     FILE *fPtr = (FILE *) png_get_io_ptr(png_write);
     if (fwrite(data, 1, length, fPtr) != length)
-        DebugMessage(M64MSG_ERROR, "Failed to write %i bytes to screenshot file.", length);
+        DebugMessage(M64MSG_ERROR, "Failed to write %zi bytes to screenshot file.", length);
 }
 
 static void user_flush_data(png_structp png_write)
diff --git a/src/r4300/recomp.c b/src/r4300/recomp.c
index f20ac5d..85e4d3d 100644
--- a/src/r4300/recomp.c
+++ b/src/r4300/recomp.c
@@ -2636,19 +2636,15 @@ void *malloc_exec(size_t size)
 	return VirtualAlloc(NULL, size, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
 #elif defined(__GNUC__)
 
-#ifndef  MAP_ANONYMOUS
-   #ifdef MAP_ANON
-      #define MAP_ANONYMOUS MAP_ANON
+   #ifndef  MAP_ANONYMOUS
+      #ifdef MAP_ANON
+         #define MAP_ANONYMOUS MAP_ANON
+      #endif
    #endif
-#endif
-
-   int pagesize = sysconf(_SC_PAGE_SIZE);
-   if (pagesize == -1)
-       { DebugMessage(M64MSG_ERROR, "Memory error: couldn't determine system memory page size."); return NULL; }
 
    void *block = mmap(NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
    if (block == MAP_FAILED)
-       { DebugMessage(M64MSG_ERROR, "Memory error: couldn't allocate %i byte block of %zd-byte aligned RWX memory.", size, pagesize); return NULL; }
+       { DebugMessage(M64MSG_ERROR, "Memory error: couldn't allocate %zi byte block of aligned RWX memory.", size); return NULL; }
 
    return block;
 #else
diff --git a/tools/build_modules_src.sh b/tools/build_modules_src.sh
index 8b7f375..7e004dd 100755
--- a/tools/build_modules_src.sh
+++ b/tools/build_modules_src.sh
@@ -34,7 +34,7 @@ for modname in ${modules}; do
   echo "************************************ Downloading and packaging module source code: ${modname}"
   rm -rf "tmp"
   hg clone --noupdate "http://bitbucket.org/richard42/$modname" "tmp"
-  EXCLUDE="--exclude tmp/.hgtags --exclude tmp/.hg_archival.txt"
+  EXCLUDE="--exclude tmp/.hgtags --exclude tmp/.hg_archival.txt tmp/.hgignore"
   if [ $# -eq 3 -a "$3" = "-norom" -a "$modname" = "mupen64plus-core" ]; then
     EXCLUDE="${EXCLUDE} --exclude tmp/roms"
   fi

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus-core.git



More information about the Pkg-games-commits mailing list