From fd2f0ea18ec4ebaa51e8f0e985967e6a5fc247dd Mon Sep 17 00:00:00 2001 From: Rosalie Wanders Date: Wed, 19 Jul 2023 15:40:31 +0200 Subject: [PATCH] 3rdParty: update mupen64plus-video-GLideN64 --- .../mupen64plus-video-GLideN64/.gitrepo | 4 ++-- .../mupen64plus-video-GLideN64/src/Debugger.cpp | 8 ++++++++ .../mupen64plus-video-GLideN64/src/GLideN64.cpp | 4 ++++ .../mupen64plus/mupen64plus_DisplayWindow.cpp | 8 ++++++++ .../src/getRevision.sh | 17 +++++++++++------ 5 files changed, 33 insertions(+), 8 deletions(-) diff --git a/Source/3rdParty/mupen64plus-video-GLideN64/.gitrepo b/Source/3rdParty/mupen64plus-video-GLideN64/.gitrepo index 128dad83..a6fd71e7 100644 --- a/Source/3rdParty/mupen64plus-video-GLideN64/.gitrepo +++ b/Source/3rdParty/mupen64plus-video-GLideN64/.gitrepo @@ -6,7 +6,7 @@ [subrepo] remote = git@github.com:/Rosalie241/GLideN64.git branch = RMG - commit = 2f1b358028e700fcae2502a53f4f5e6822ce0367 - parent = 028316ababb4f76db45f62ada48ba0e274e2ea37 + commit = fdb093792607a57dd9adc60c3d9ee4c1990852d3 + parent = 26414e59cc1359535c4bf26a3ac3f4dec5078446 method = merge cmdver = 0.4.6 diff --git a/Source/3rdParty/mupen64plus-video-GLideN64/src/Debugger.cpp b/Source/3rdParty/mupen64plus-video-GLideN64/src/Debugger.cpp index 7873ed10..44416392 100644 --- a/Source/3rdParty/mupen64plus-video-GLideN64/src/Debugger.cpp +++ b/Source/3rdParty/mupen64plus-video-GLideN64/src/Debugger.cpp @@ -36,11 +36,19 @@ bool getCursorPos(long & _x, long & _y) static HWND hWnd = NULL; if (hWnd == NULL) { wchar_t caption[64]; +#ifdef PLUGIN_REVISION_W # ifdef _DEBUG swprintf(caption, 64, L"mupen64plus: %ls debug. Revision %ls", pluginNameW, PLUGIN_REVISION_W); # else // _DEBUG swprintf(caption, 64, L"%s. Revision %s", pluginName, PLUGIN_REVISION); # endif // _DEBUG +#else // PLUGIN_REVISION_W +# ifdef _DEBUG + swprintf(caption, 64, L"mupen64plus: %ls debug.", pluginNameW); +# else // _DEBUG + swprintf(caption, 64, L"%s", pluginName); +# endif // _DEBUG +#endif // PLUGIN_REVISION_W hWnd = FindWindowExW(NULL, NULL, NULL, caption); } ScreenToClient(hWnd, &pt); diff --git a/Source/3rdParty/mupen64plus-video-GLideN64/src/GLideN64.cpp b/Source/3rdParty/mupen64plus-video-GLideN64/src/GLideN64.cpp index f5950189..bb3ca617 100644 --- a/Source/3rdParty/mupen64plus-video-GLideN64/src/GLideN64.cpp +++ b/Source/3rdParty/mupen64plus-video-GLideN64/src/GLideN64.cpp @@ -1,5 +1,9 @@ #include char pluginName[] = "GLideN64"; +#ifdef PLUGIN_REVISION char pluginNameWithRevision[] = "GLideN64 rev." PLUGIN_REVISION; +#else // PLUGIN_REVISION +char pluginNameWithRevision[] = "GLideN64"; +#endif // PLUGIN_REVISION wchar_t pluginNameW[] = L"GLideN64"; void (*CheckInterrupts)( void ); diff --git a/Source/3rdParty/mupen64plus-video-GLideN64/src/Graphics/OpenGLContext/mupen64plus/mupen64plus_DisplayWindow.cpp b/Source/3rdParty/mupen64plus-video-GLideN64/src/Graphics/OpenGLContext/mupen64plus/mupen64plus_DisplayWindow.cpp index aaaf78a9..d33da3f0 100644 --- a/Source/3rdParty/mupen64plus-video-GLideN64/src/Graphics/OpenGLContext/mupen64plus/mupen64plus_DisplayWindow.cpp +++ b/Source/3rdParty/mupen64plus-video-GLideN64/src/Graphics/OpenGLContext/mupen64plus/mupen64plus_DisplayWindow.cpp @@ -116,11 +116,19 @@ bool DisplayWindowMupen64plus::_start() } char caption[128]; +#ifdef PLUGIN_REVISION # ifdef _DEBUG sprintf(caption, "%s debug. Revision %s", pluginName, PLUGIN_REVISION); # else // _DEBUG sprintf(caption, "%s. Revision %s", pluginName, PLUGIN_REVISION); # endif // _DEBUG +#else // PLUGIN_REVISION +# ifdef _DEBUG + sprintf(caption, "%s debug", pluginName); +# else // _DEBUG + sprintf(caption, "%s", pluginName); +# endif // _DEBUG +#endif // PLUGIN_REVISION CoreVideo_SetCaption(caption); return true; diff --git a/Source/3rdParty/mupen64plus-video-GLideN64/src/getRevision.sh b/Source/3rdParty/mupen64plus-video-GLideN64/src/getRevision.sh index df1b5237..149019dd 100755 --- a/Source/3rdParty/mupen64plus-video-GLideN64/src/getRevision.sh +++ b/Source/3rdParty/mupen64plus-video-GLideN64/src/getRevision.sh @@ -8,22 +8,27 @@ header="${OUTPUT:-./Revision.h}" if [ "${1:-}" != --nogit ] then - rev="\"$(git rev-parse --short HEAD)\"" || rev='""' + rev="\"$(git rev-parse --short HEAD)\"" || rev='""' else - rev='""' + rev='""' fi lastrev='' if [ -e "$header" ] then - lastrev="$(head -n 1 "$header" 2> /dev/null | cut -d ' ' -f3)" + lastrev="$(head -n 1 "$header" 2> /dev/null | cut -d ' ' -f3)" fi printf '%s\n' "current revision $rev" "last build revision $lastrev" if [ "$lastrev" != "$rev" ] then - [ "$header" = "${header##*/}" ] || mkdir -p -- "${header%/*}" - printf '%s\n' "#define PLUGIN_REVISION $rev" \ - "#define PLUGIN_REVISION_W L$rev" > "$header" + [ "$header" = "${header##*/}" ] || mkdir -p -- "${header%/*}" + if [ "x$rev" != "x\"\"" ] + then + printf '%s\n' "#define PLUGIN_REVISION $rev" \ + "#define PLUGIN_REVISION_W L$rev" > "$header" + else + printf '\n' > "$header" + fi fi