Anonymous avatar Anonymous committed daa3f1b

quick and dirty support for compiling against 2.1.0 video plugin API

Comments (0)

Files changed (3)

 #define PLUGIN_VERSION           0x016304
 #define VIDEO_PLUGIN_API_VERSION 0x020000
 #define CONFIG_API_VERSION       0x020000
-#define VIDEXT_API_VERSION       0x020000
+#define VIDEXT_API_VERSION       0x020100
 
 #define VERSION_PRINTF_SPLIT(x) (((x) >> 16) & 0xffff), (((x) >> 8) & 0xff), ((x) & 0xff)
 
 GFX_INFO gfx;
 
-void (*render_callback)() = NULL;
+void (*render_callback)(int) = NULL;
 static void (*l_DebugCallback)(void *, int, const char *) = NULL;
 static void *l_DebugCallContext = NULL;
 
         return M64ERR_SUCCESS;
     }
 
-    EXPORT void CALL SetRenderingCallback(void (*callback)())
+    EXPORT void CALL SetRenderingCallback(void (*callback)(int))
     {
         render_callback = callback;
     }
 };
 
 extern rglSettings_t rglSettings;
-extern void (*render_callback)();
+extern void (*render_callback)(int);
 
 struct rglDepthBuffer_t {
     uint32_t address;

src/rgl_osdep.cpp

 
 void rglSwapBuffers()
 {
+	//TODO: if screenshot capabilities are ever implemented, replace the
+	//hard-coded 1 with a value indicating whether the screen has been redrawn
     if (render_callback != NULL)
-        render_callback();
+        render_callback(1);
     CoreVideo_GL_SwapBuffers();
     return;
 }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.