From 5b6a14edeb6f9ad14a6d1a796e78c60e5280ba60 Mon Sep 17 00:00:00 2001 From: fp64 <106717720+fp64@users.noreply.github.com> Date: Tue, 16 Aug 2022 18:22:01 -0400 Subject: [PATCH] Add a newline to "Leaving main" message. Also implement SYSPROP_DISPLAY_XRES/SYSPROP_DISPLAY_YRES for SDL. Also fix couple of warnings. --- Common/Render/TextureAtlas.h | 2 +- Core/HLE/sceAudiocodec.cpp | 5 +++++ SDL/SDLMain.cpp | 6 +++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Common/Render/TextureAtlas.h b/Common/Render/TextureAtlas.h index 58a2b86c96..aed38e273f 100644 --- a/Common/Render/TextureAtlas.h +++ b/Common/Render/TextureAtlas.h @@ -3,7 +3,7 @@ #include #include -#define ATLAS_MAGIC ('A' + ('T' << 8) + ('L' << 16) | ('A' << 24)) +#define ATLAS_MAGIC ('A' | ('T' << 8) | ('L' << 16) | ('A' << 24)) // Metadata file structure v0: // diff --git a/Core/HLE/sceAudiocodec.cpp b/Core/HLE/sceAudiocodec.cpp index 6d40c6802e..3c9643d897 100644 --- a/Core/HLE/sceAudiocodec.cpp +++ b/Core/HLE/sceAudiocodec.cpp @@ -187,6 +187,9 @@ void __sceAudiocodecDoState(PointerWrap &p){ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunknown-warning-option" #pragma clang diagnostic ignored "-Wsizeof-pointer-div" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsizeof-pointer-div" #endif DoArray(p, codec_, s >= 2 ? count : (int)ARRAY_SIZE(codec_)); DoArray(p, ctxPtr_, s >= 2 ? count : (int)ARRAY_SIZE(ctxPtr_)); @@ -197,6 +200,8 @@ void __sceAudiocodecDoState(PointerWrap &p){ } #ifdef __clang__ #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif delete[] codec_; delete[] ctxPtr_; diff --git a/SDL/SDLMain.cpp b/SDL/SDLMain.cpp index ec612d1182..da966cabae 100644 --- a/SDL/SDLMain.cpp +++ b/SDL/SDLMain.cpp @@ -388,6 +388,10 @@ int System_GetPropertyInt(SystemProperty prop) { return KEYBOARD_LAYOUT_QWERTZ; return KEYBOARD_LAYOUT_QWERTY; } + case SYSPROP_DISPLAY_XRES: + return g_DesktopWidth; + case SYSPROP_DISPLAY_YRES: + return g_DesktopHeight; default: return -1; } @@ -1240,7 +1244,7 @@ int main(int argc, char *argv[]) { #endif glslang::FinalizeProcess(); - printf("Leaving main"); + printf("Leaving main\n"); #ifdef HAVE_LIBNX socketExit(); #endif