mirror of
https://github.com/RetroPie/RetroPie-Setup.git
synced 2025-04-02 10:51:41 -04:00
Move the SDL declarations from MYOSGLUE.h to MYOSGLUE.c This fixes building on GCC 10+ due to the MYOSGLUE.h header being included by every source file. PR has been sent upstream https://github.com/vanfanel/minivmac_sdl2/pull/3
51 lines
1 KiB
Diff
51 lines
1 KiB
Diff
--- a/src/MYOSGLUE.c
|
|
+++ b/src/MYOSGLUE.c
|
|
@@ -29,6 +29,24 @@
|
|
|
|
#include "STRCONST.h"
|
|
|
|
+/* SDL2 window */
|
|
+SDL_Window *window;
|
|
+
|
|
+/* SDL2 renderer */
|
|
+SDL_Renderer *renderer;
|
|
+
|
|
+/* SDL2 texture */
|
|
+SDL_Texture *texture;
|
|
+
|
|
+/* SDL2 blitting rects for hw scaling
|
|
+ * ratio correction using SDL_RenderCopy() */
|
|
+SDL_Rect src_rect;
|
|
+SDL_Rect dst_rect;
|
|
+
|
|
+/* SDL2 physical screen dimensions */
|
|
+int displayWidth;
|
|
+int displayHeight;
|
|
+
|
|
/* --- some simple utilities --- */
|
|
|
|
GLOBALPROC MyMoveBytes(anyp srcPtr, anyp destPtr, si5b byteCount)
|
|
--- a/src/MYOSGLUE.h
|
|
+++ b/src/MYOSGLUE.h
|
|
@@ -401,21 +401,3 @@ EXPORTPROC MyEvtQOutDone(void);
|
|
|
|
#include <SDL2/SDL.h>
|
|
#include <SDL2/SDL_keycode.h>
|
|
-
|
|
-/* SDL2 window */
|
|
-SDL_Window *window;
|
|
-
|
|
-/* SDL2 renderer */
|
|
-SDL_Renderer *renderer;
|
|
-
|
|
-/* SDL2 texture */
|
|
-SDL_Texture *texture;
|
|
-
|
|
-/* SDL2 blitting rects for hw scaling
|
|
- * ratio correction using SDL_RenderCopy() */
|
|
-SDL_Rect src_rect;
|
|
-SDL_Rect dst_rect;
|
|
-
|
|
-/* SDL2 physical screen dimensions */
|
|
-int displayWidth;
|
|
-int displayHeight;
|