From b190c52b159c8b18c9e312cfb7020d75bcfd2598 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Fri, 6 Feb 2026 04:24:41 -0500 Subject: [PATCH 01/12] initial message thingy --- source/client/app/AppPlatform.cpp | 19 +++++++++++++++++++ source/client/app/AppPlatform.hpp | 20 ++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/source/client/app/AppPlatform.cpp b/source/client/app/AppPlatform.cpp index 0df9f4b57..f8cd2caa0 100644 --- a/source/client/app/AppPlatform.cpp +++ b/source/client/app/AppPlatform.cpp @@ -403,3 +403,22 @@ void AppPlatform::beginProfileDataWrite(unsigned int playerId) void AppPlatform::endProfileDataWrite(unsigned int playerId) { } + +void AppPlatform::showMessageModal(struct MessageModal struct) +{ + FILE *stream; + switch(struct.type) + { + case MessageModal::ERROR: + stream = stderr; + break; + default: + LOG_W("Unhandled MessageModal type"); + // fall through + case MessageModal::INFO: + stream = stdout; + break; + } + + fputs(struct.test.c_str(), stream); +} diff --git a/source/client/app/AppPlatform.hpp b/source/client/app/AppPlatform.hpp index 812224880..1600e150a 100644 --- a/source/client/app/AppPlatform.hpp +++ b/source/client/app/AppPlatform.hpp @@ -43,6 +43,24 @@ class AppPlatformListener; class AppPlatform { public: + struct MessageModal + { + enum Type + { + INFO, + ERROR + }; + + Type type; + std::string text; + + MessageModal(Type type, const std::string& text) + : type(type) + , text(text) + { + } + }; + typedef std::multimap ListenerMap; public: @@ -135,6 +153,8 @@ class AppPlatform virtual void beginProfileDataWrite(unsigned int playerId); virtual void endProfileDataWrite(unsigned int playerId); + virtual void showMessageModal(struct MessageModal); + public: ListenerMap m_listeners; std::string m_externalStorageDir; From dc4fbfad8d42ea9dec130b00017093d6b5d9910c Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Fri, 6 Feb 2026 04:24:51 -0500 Subject: [PATCH 02/12] sdl2 version --- platforms/sdl/sdl2/base/AppPlatform_sdl2.cpp | 23 ++++++++++++++++++++ platforms/sdl/sdl2/base/AppPlatform_sdl2.hpp | 2 ++ 2 files changed, 25 insertions(+) diff --git a/platforms/sdl/sdl2/base/AppPlatform_sdl2.cpp b/platforms/sdl/sdl2/base/AppPlatform_sdl2.cpp index 04817df7f..80fa955c4 100644 --- a/platforms/sdl/sdl2/base/AppPlatform_sdl2.cpp +++ b/platforms/sdl/sdl2/base/AppPlatform_sdl2.cpp @@ -192,3 +192,26 @@ bool AppPlatform_sdl2::GetMouseButtonState(const SDL_Event& event) return result; } + +void AppPlatform_sdl2::showMessageModal(struct MessageModal struct) +{ + const char *title; + Uint32 flags = 0; + + switch (struct.type) + { + case MessageModal::ERROR: + title = "Error"; + flags = SDL_MESSAGEBOX_ERROR; + break; + default: + LOG_W("Unhandled MessageModal type"); + // fall through + case MessageModal::INFO: + title = "Info"; + flags = SDL_MESSAGEBOX_INFORMATION; + break; + } + + SDL_ShowSimpleMessageBox(flags, title, struct.message.c_str(), nullptr); +} diff --git a/platforms/sdl/sdl2/base/AppPlatform_sdl2.hpp b/platforms/sdl/sdl2/base/AppPlatform_sdl2.hpp index 7463f0198..4a5ffb330 100644 --- a/platforms/sdl/sdl2/base/AppPlatform_sdl2.hpp +++ b/platforms/sdl/sdl2/base/AppPlatform_sdl2.hpp @@ -43,6 +43,8 @@ class AppPlatform_sdl2 : public AppPlatform_sdl void gameControllerAdded(int32_t index); void gameControllerRemoved(int32_t index); + void showMessageModal(struct MessageModal) override; + public: static bool GetMouseButtonState(const SDL_Event& event); From 895906d1db0f03fb851724989bf4665bdad45604 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Fri, 6 Feb 2026 04:26:58 -0500 Subject: [PATCH 03/12] fix --- source/client/app/AppPlatform.cpp | 6 +++--- source/client/app/AppPlatform.hpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/client/app/AppPlatform.cpp b/source/client/app/AppPlatform.cpp index f8cd2caa0..fd319e0db 100644 --- a/source/client/app/AppPlatform.cpp +++ b/source/client/app/AppPlatform.cpp @@ -404,10 +404,10 @@ void AppPlatform::endProfileDataWrite(unsigned int playerId) { } -void AppPlatform::showMessageModal(struct MessageModal struct) +void AppPlatform::showMessageModal(struct MessageModal msg) { FILE *stream; - switch(struct.type) + switch(msg.type) { case MessageModal::ERROR: stream = stderr; @@ -420,5 +420,5 @@ void AppPlatform::showMessageModal(struct MessageModal struct) break; } - fputs(struct.test.c_str(), stream); + fputs(msg.text.c_str(), stream); } diff --git a/source/client/app/AppPlatform.hpp b/source/client/app/AppPlatform.hpp index 1600e150a..c62a9abb5 100644 --- a/source/client/app/AppPlatform.hpp +++ b/source/client/app/AppPlatform.hpp @@ -153,7 +153,7 @@ class AppPlatform virtual void beginProfileDataWrite(unsigned int playerId); virtual void endProfileDataWrite(unsigned int playerId); - virtual void showMessageModal(struct MessageModal); + virtual void showMessageModal(struct MessageModal msg); public: ListenerMap m_listeners; From 18f5a86de77d75a4634a6c6b44eb0a981ae94d5a Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Fri, 6 Feb 2026 04:27:37 -0500 Subject: [PATCH 04/12] fix --- platforms/sdl/sdl2/base/AppPlatform_sdl2.cpp | 6 +++--- platforms/sdl/sdl2/base/AppPlatform_sdl2.hpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/platforms/sdl/sdl2/base/AppPlatform_sdl2.cpp b/platforms/sdl/sdl2/base/AppPlatform_sdl2.cpp index 80fa955c4..ccc5bb817 100644 --- a/platforms/sdl/sdl2/base/AppPlatform_sdl2.cpp +++ b/platforms/sdl/sdl2/base/AppPlatform_sdl2.cpp @@ -193,12 +193,12 @@ bool AppPlatform_sdl2::GetMouseButtonState(const SDL_Event& event) return result; } -void AppPlatform_sdl2::showMessageModal(struct MessageModal struct) +void AppPlatform_sdl2::showMessageModal(struct MessageModal msg) { const char *title; Uint32 flags = 0; - switch (struct.type) + switch (msg.type) { case MessageModal::ERROR: title = "Error"; @@ -213,5 +213,5 @@ void AppPlatform_sdl2::showMessageModal(struct MessageModal struct) break; } - SDL_ShowSimpleMessageBox(flags, title, struct.message.c_str(), nullptr); + SDL_ShowSimpleMessageBox(flags, title, msg.text.c_str(), nullptr); } diff --git a/platforms/sdl/sdl2/base/AppPlatform_sdl2.hpp b/platforms/sdl/sdl2/base/AppPlatform_sdl2.hpp index 4a5ffb330..e4d849d16 100644 --- a/platforms/sdl/sdl2/base/AppPlatform_sdl2.hpp +++ b/platforms/sdl/sdl2/base/AppPlatform_sdl2.hpp @@ -43,7 +43,7 @@ class AppPlatform_sdl2 : public AppPlatform_sdl void gameControllerAdded(int32_t index); void gameControllerRemoved(int32_t index); - void showMessageModal(struct MessageModal) override; + void showMessageModal(struct MessageModal msg) override; public: static bool GetMouseButtonState(const SDL_Event& event); From 6774bdafd56112adac30f57ea7fba1f24844500d Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Fri, 6 Feb 2026 05:11:15 -0500 Subject: [PATCH 05/12] change type names --- platforms/sdl/sdl2/base/AppPlatform_sdl2.cpp | 4 ++-- source/client/app/AppPlatform.cpp | 4 ++-- source/client/app/AppPlatform.hpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/platforms/sdl/sdl2/base/AppPlatform_sdl2.cpp b/platforms/sdl/sdl2/base/AppPlatform_sdl2.cpp index ccc5bb817..185f3e4af 100644 --- a/platforms/sdl/sdl2/base/AppPlatform_sdl2.cpp +++ b/platforms/sdl/sdl2/base/AppPlatform_sdl2.cpp @@ -200,14 +200,14 @@ void AppPlatform_sdl2::showMessageModal(struct MessageModal msg) switch (msg.type) { - case MessageModal::ERROR: + case MessageModal::TYPE_ERROR: title = "Error"; flags = SDL_MESSAGEBOX_ERROR; break; default: LOG_W("Unhandled MessageModal type"); // fall through - case MessageModal::INFO: + case MessageModal::TYPE_INFO: title = "Info"; flags = SDL_MESSAGEBOX_INFORMATION; break; diff --git a/source/client/app/AppPlatform.cpp b/source/client/app/AppPlatform.cpp index fd319e0db..400f93717 100644 --- a/source/client/app/AppPlatform.cpp +++ b/source/client/app/AppPlatform.cpp @@ -409,13 +409,13 @@ void AppPlatform::showMessageModal(struct MessageModal msg) FILE *stream; switch(msg.type) { - case MessageModal::ERROR: + case MessageModal::TYPE_ERROR: stream = stderr; break; default: LOG_W("Unhandled MessageModal type"); // fall through - case MessageModal::INFO: + case MessageModal::TYPE_INFO: stream = stdout; break; } diff --git a/source/client/app/AppPlatform.hpp b/source/client/app/AppPlatform.hpp index c62a9abb5..9a81d4e40 100644 --- a/source/client/app/AppPlatform.hpp +++ b/source/client/app/AppPlatform.hpp @@ -47,8 +47,8 @@ class AppPlatform { enum Type { - INFO, - ERROR + TYPE_INFO, + TYPE_ERROR }; Type type; From 8d6ce2ca347cb3f17f10c8480b5448a4eb19487e Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Fri, 6 Feb 2026 05:33:55 -0500 Subject: [PATCH 06/12] fix --- source/client/app/AppPlatform.hpp | 37 ++++++++++++++++--------------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/source/client/app/AppPlatform.hpp b/source/client/app/AppPlatform.hpp index 9a81d4e40..d51f872fd 100644 --- a/source/client/app/AppPlatform.hpp +++ b/source/client/app/AppPlatform.hpp @@ -37,30 +37,31 @@ #define C_HOME_PATH "/games/com.mojang/" #define C_MAX_LOCAL_PLAYERS 4 +struct MessageModal +{ + enum Type + { + TYPE_INFO, + TYPE_ERROR + }; + + Type type; + std::string text; + + MessageModal(Type type, const std::string& text) + : type(type) + , text(text) + { + } +}; + + class GameControllerHandler; class AppPlatformListener; class AppPlatform { public: - struct MessageModal - { - enum Type - { - TYPE_INFO, - TYPE_ERROR - }; - - Type type; - std::string text; - - MessageModal(Type type, const std::string& text) - : type(type) - , text(text) - { - } - }; - typedef std::multimap ListenerMap; public: From 9c95ec88479f9a5150dbeb1faf36f6654aa9fd71 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Fri, 6 Feb 2026 05:39:16 -0500 Subject: [PATCH 07/12] win32 showMessageModal --- platforms/windows/AppPlatform_win32.cpp | 23 +++++++++++++++++++++++ platforms/windows/AppPlatform_win32.hpp | 2 ++ 2 files changed, 25 insertions(+) diff --git a/platforms/windows/AppPlatform_win32.cpp b/platforms/windows/AppPlatform_win32.cpp index f54c64812..f8913816c 100644 --- a/platforms/windows/AppPlatform_win32.cpp +++ b/platforms/windows/AppPlatform_win32.cpp @@ -570,3 +570,26 @@ Keyboard::KeyState AppPlatform_win32::GetKeyState(UINT iMsg) return Keyboard::KeyState::DOWN; } } + +void AppPlatform_win32::showMessageModal(struct MessageModal msg) +{ + const char *title; + uint32_t flags = 0; + + switch (msg.type) + { + case MessageModal::TYPE_ERROR: + title = "Error"; + flags = MB_ICONERROR; + break; + default: + LOG_W("Unhandled MessageModal type"); + // fall through + case MessageModal::TYPE_INFO: + title = "Info"; + flags = MB_ICONINFORMATION; + break; + } + + MessageBoxA(NULL, msg.text.c_str(), title, flags); +} diff --git a/platforms/windows/AppPlatform_win32.hpp b/platforms/windows/AppPlatform_win32.hpp index 1dc3bb7e0..a343b5629 100644 --- a/platforms/windows/AppPlatform_win32.hpp +++ b/platforms/windows/AppPlatform_win32.hpp @@ -87,6 +87,8 @@ class AppPlatform_win32 : public AppPlatform static bool GetMouseButtonState(UINT iMsg, WPARAM wParam); static Keyboard::KeyState GetKeyState(UINT iMsg); + void showMessageModal(struct MessageModal msg) override; + private: HICON m_cursor; From 54f07c94089a4c95237c5de6055e6dfdef9fb54b Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Fri, 6 Feb 2026 05:45:04 -0500 Subject: [PATCH 08/12] testing --- source/client/gui/screens/CreditsScreen.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/client/gui/screens/CreditsScreen.cpp b/source/client/gui/screens/CreditsScreen.cpp index 7267ac130..60c4287dd 100644 --- a/source/client/gui/screens/CreditsScreen.cpp +++ b/source/client/gui/screens/CreditsScreen.cpp @@ -32,6 +32,9 @@ void CreditsScreen::_initCreditsText() { m_credits.push_back("Failed to load credits.txt"); } + + // for testing only, should not make it into master, remove if found + AppPlatform::singleton()->showMessageModal(MessageModal(MessageModal::TYPE_INFO, "death")); } void CreditsScreen::init() From 516a262a6348c25b292342551e34088788a94a38 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Fri, 6 Feb 2026 06:00:16 -0500 Subject: [PATCH 09/12] iOS showMessageModal --- platforms/ios/AppPlatform_iOS.h | 2 ++ platforms/ios/AppPlatform_iOS.mm | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/platforms/ios/AppPlatform_iOS.h b/platforms/ios/AppPlatform_iOS.h index a558a9e5a..a5b04e61e 100644 --- a/platforms/ios/AppPlatform_iOS.h +++ b/platforms/ios/AppPlatform_iOS.h @@ -47,6 +47,8 @@ class AppPlatform_iOS : public AppPlatform // Also add these to allow saving options. bool hasFileSystemAccess() override; + + void showMessageModal(struct MessageModal) override; private: Logger* m_pLogger; SoundSystem* m_pSoundSystem; diff --git a/platforms/ios/AppPlatform_iOS.mm b/platforms/ios/AppPlatform_iOS.mm index fe1e0b233..ad035e7cd 100644 --- a/platforms/ios/AppPlatform_iOS.mm +++ b/platforms/ios/AppPlatform_iOS.mm @@ -177,3 +177,31 @@ return [assetPath UTF8String]; } + +void AppPlatform_iOS::showMessageModal(struct MessageModal msg) +{ + NSString *title; + switch(msg.type) + { + case MessageModal::TYPE_ERROR: + title = @"Error"; + break; + default: + LOG_W("Unhandled MessageModal type"); + // fall through + case MessageModal::TYPE_INFO: + title = @"Info"; + break; + } + + UIAlertView *alert = [[UIAlertView alloc] + initWithTitle:title + message:[NSString stringWithCString:msg.text.c_str() + encoding:[NSString defaultCStringEncoding]] + delegate:nil + cancelButtonTitle:@"OK" + otherButtonTitles:nil + ]; + [alert show]; + [alert release]; +} From f68830c8b58247806eb10d96349cf3f685d872d5 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Fri, 6 Feb 2026 06:12:43 -0500 Subject: [PATCH 10/12] change function sig --- platforms/ios/AppPlatform_iOS.h | 2 +- platforms/ios/AppPlatform_iOS.mm | 2 +- platforms/sdl/sdl2/base/AppPlatform_sdl2.cpp | 3 ++- platforms/sdl/sdl2/base/AppPlatform_sdl2.hpp | 2 +- platforms/windows/AppPlatform_win32.cpp | 2 +- platforms/windows/AppPlatform_win32.hpp | 2 +- source/client/app/AppPlatform.cpp | 2 +- source/client/app/AppPlatform.hpp | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/platforms/ios/AppPlatform_iOS.h b/platforms/ios/AppPlatform_iOS.h index a5b04e61e..48f302124 100644 --- a/platforms/ios/AppPlatform_iOS.h +++ b/platforms/ios/AppPlatform_iOS.h @@ -48,7 +48,7 @@ class AppPlatform_iOS : public AppPlatform // Also add these to allow saving options. bool hasFileSystemAccess() override; - void showMessageModal(struct MessageModal) override; + void showMessageModal(const struct MessageModal& msg) override; private: Logger* m_pLogger; SoundSystem* m_pSoundSystem; diff --git a/platforms/ios/AppPlatform_iOS.mm b/platforms/ios/AppPlatform_iOS.mm index ad035e7cd..697293989 100644 --- a/platforms/ios/AppPlatform_iOS.mm +++ b/platforms/ios/AppPlatform_iOS.mm @@ -178,7 +178,7 @@ return [assetPath UTF8String]; } -void AppPlatform_iOS::showMessageModal(struct MessageModal msg) +void AppPlatform_iOS::showMessageModal(const struct MessageModal& msg) { NSString *title; switch(msg.type) diff --git a/platforms/sdl/sdl2/base/AppPlatform_sdl2.cpp b/platforms/sdl/sdl2/base/AppPlatform_sdl2.cpp index 185f3e4af..a024a10c2 100644 --- a/platforms/sdl/sdl2/base/AppPlatform_sdl2.cpp +++ b/platforms/sdl/sdl2/base/AppPlatform_sdl2.cpp @@ -193,7 +193,8 @@ bool AppPlatform_sdl2::GetMouseButtonState(const SDL_Event& event) return result; } -void AppPlatform_sdl2::showMessageModal(struct MessageModal msg) +// this segfaults on wsl, why? +void AppPlatform_sdl2::showMessageModal(const struct MessageModal& msg) { const char *title; Uint32 flags = 0; diff --git a/platforms/sdl/sdl2/base/AppPlatform_sdl2.hpp b/platforms/sdl/sdl2/base/AppPlatform_sdl2.hpp index e4d849d16..fcfe7b714 100644 --- a/platforms/sdl/sdl2/base/AppPlatform_sdl2.hpp +++ b/platforms/sdl/sdl2/base/AppPlatform_sdl2.hpp @@ -43,7 +43,7 @@ class AppPlatform_sdl2 : public AppPlatform_sdl void gameControllerAdded(int32_t index); void gameControllerRemoved(int32_t index); - void showMessageModal(struct MessageModal msg) override; + void showMessageModal(const struct MessageModal& msg) override; public: static bool GetMouseButtonState(const SDL_Event& event); diff --git a/platforms/windows/AppPlatform_win32.cpp b/platforms/windows/AppPlatform_win32.cpp index f8913816c..6b9495346 100644 --- a/platforms/windows/AppPlatform_win32.cpp +++ b/platforms/windows/AppPlatform_win32.cpp @@ -571,7 +571,7 @@ Keyboard::KeyState AppPlatform_win32::GetKeyState(UINT iMsg) } } -void AppPlatform_win32::showMessageModal(struct MessageModal msg) +void AppPlatform_win32::showMessageModal(const struct MessageModal& msg) { const char *title; uint32_t flags = 0; diff --git a/platforms/windows/AppPlatform_win32.hpp b/platforms/windows/AppPlatform_win32.hpp index a343b5629..19d62eaf0 100644 --- a/platforms/windows/AppPlatform_win32.hpp +++ b/platforms/windows/AppPlatform_win32.hpp @@ -87,7 +87,7 @@ class AppPlatform_win32 : public AppPlatform static bool GetMouseButtonState(UINT iMsg, WPARAM wParam); static Keyboard::KeyState GetKeyState(UINT iMsg); - void showMessageModal(struct MessageModal msg) override; + void showMessageModal(const struct MessageModal& msg) override; private: HICON m_cursor; diff --git a/source/client/app/AppPlatform.cpp b/source/client/app/AppPlatform.cpp index 400f93717..9c898daaf 100644 --- a/source/client/app/AppPlatform.cpp +++ b/source/client/app/AppPlatform.cpp @@ -404,7 +404,7 @@ void AppPlatform::endProfileDataWrite(unsigned int playerId) { } -void AppPlatform::showMessageModal(struct MessageModal msg) +void AppPlatform::showMessageModal(const struct MessageModal& msg) { FILE *stream; switch(msg.type) diff --git a/source/client/app/AppPlatform.hpp b/source/client/app/AppPlatform.hpp index d51f872fd..cf75fafbd 100644 --- a/source/client/app/AppPlatform.hpp +++ b/source/client/app/AppPlatform.hpp @@ -154,7 +154,7 @@ class AppPlatform virtual void beginProfileDataWrite(unsigned int playerId); virtual void endProfileDataWrite(unsigned int playerId); - virtual void showMessageModal(struct MessageModal msg); + virtual void showMessageModal(const struct MessageModal& msg); public: ListenerMap m_listeners; From 50732ca57ecc91f80433cf8ccfc8c829688d8174 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Fri, 6 Feb 2026 06:14:00 -0500 Subject: [PATCH 11/12] dont specify struct --- platforms/ios/AppPlatform_iOS.h | 2 +- platforms/ios/AppPlatform_iOS.mm | 2 +- platforms/sdl/sdl2/base/AppPlatform_sdl2.cpp | 2 +- platforms/sdl/sdl2/base/AppPlatform_sdl2.hpp | 2 +- platforms/windows/AppPlatform_win32.cpp | 2 +- platforms/windows/AppPlatform_win32.hpp | 2 +- source/client/app/AppPlatform.cpp | 2 +- source/client/app/AppPlatform.hpp | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/platforms/ios/AppPlatform_iOS.h b/platforms/ios/AppPlatform_iOS.h index 48f302124..cee1848fb 100644 --- a/platforms/ios/AppPlatform_iOS.h +++ b/platforms/ios/AppPlatform_iOS.h @@ -48,7 +48,7 @@ class AppPlatform_iOS : public AppPlatform // Also add these to allow saving options. bool hasFileSystemAccess() override; - void showMessageModal(const struct MessageModal& msg) override; + void showMessageModal(const MessageModal& msg) override; private: Logger* m_pLogger; SoundSystem* m_pSoundSystem; diff --git a/platforms/ios/AppPlatform_iOS.mm b/platforms/ios/AppPlatform_iOS.mm index 697293989..e56a76737 100644 --- a/platforms/ios/AppPlatform_iOS.mm +++ b/platforms/ios/AppPlatform_iOS.mm @@ -178,7 +178,7 @@ return [assetPath UTF8String]; } -void AppPlatform_iOS::showMessageModal(const struct MessageModal& msg) +void AppPlatform_iOS::showMessageModal(const MessageModal& msg) { NSString *title; switch(msg.type) diff --git a/platforms/sdl/sdl2/base/AppPlatform_sdl2.cpp b/platforms/sdl/sdl2/base/AppPlatform_sdl2.cpp index a024a10c2..078b456b5 100644 --- a/platforms/sdl/sdl2/base/AppPlatform_sdl2.cpp +++ b/platforms/sdl/sdl2/base/AppPlatform_sdl2.cpp @@ -194,7 +194,7 @@ bool AppPlatform_sdl2::GetMouseButtonState(const SDL_Event& event) } // this segfaults on wsl, why? -void AppPlatform_sdl2::showMessageModal(const struct MessageModal& msg) +void AppPlatform_sdl2::showMessageModal(const MessageModal& msg) { const char *title; Uint32 flags = 0; diff --git a/platforms/sdl/sdl2/base/AppPlatform_sdl2.hpp b/platforms/sdl/sdl2/base/AppPlatform_sdl2.hpp index fcfe7b714..fad671817 100644 --- a/platforms/sdl/sdl2/base/AppPlatform_sdl2.hpp +++ b/platforms/sdl/sdl2/base/AppPlatform_sdl2.hpp @@ -43,7 +43,7 @@ class AppPlatform_sdl2 : public AppPlatform_sdl void gameControllerAdded(int32_t index); void gameControllerRemoved(int32_t index); - void showMessageModal(const struct MessageModal& msg) override; + void showMessageModal(const MessageModal& msg) override; public: static bool GetMouseButtonState(const SDL_Event& event); diff --git a/platforms/windows/AppPlatform_win32.cpp b/platforms/windows/AppPlatform_win32.cpp index 6b9495346..0ef527f9c 100644 --- a/platforms/windows/AppPlatform_win32.cpp +++ b/platforms/windows/AppPlatform_win32.cpp @@ -571,7 +571,7 @@ Keyboard::KeyState AppPlatform_win32::GetKeyState(UINT iMsg) } } -void AppPlatform_win32::showMessageModal(const struct MessageModal& msg) +void AppPlatform_win32::showMessageModal(const MessageModal& msg) { const char *title; uint32_t flags = 0; diff --git a/platforms/windows/AppPlatform_win32.hpp b/platforms/windows/AppPlatform_win32.hpp index 19d62eaf0..d85babf8f 100644 --- a/platforms/windows/AppPlatform_win32.hpp +++ b/platforms/windows/AppPlatform_win32.hpp @@ -87,7 +87,7 @@ class AppPlatform_win32 : public AppPlatform static bool GetMouseButtonState(UINT iMsg, WPARAM wParam); static Keyboard::KeyState GetKeyState(UINT iMsg); - void showMessageModal(const struct MessageModal& msg) override; + void showMessageModal(const MessageModal& msg) override; private: HICON m_cursor; diff --git a/source/client/app/AppPlatform.cpp b/source/client/app/AppPlatform.cpp index 9c898daaf..a955de0c6 100644 --- a/source/client/app/AppPlatform.cpp +++ b/source/client/app/AppPlatform.cpp @@ -404,7 +404,7 @@ void AppPlatform::endProfileDataWrite(unsigned int playerId) { } -void AppPlatform::showMessageModal(const struct MessageModal& msg) +void AppPlatform::showMessageModal(const MessageModal& msg) { FILE *stream; switch(msg.type) diff --git a/source/client/app/AppPlatform.hpp b/source/client/app/AppPlatform.hpp index cf75fafbd..938437fc0 100644 --- a/source/client/app/AppPlatform.hpp +++ b/source/client/app/AppPlatform.hpp @@ -154,7 +154,7 @@ class AppPlatform virtual void beginProfileDataWrite(unsigned int playerId); virtual void endProfileDataWrite(unsigned int playerId); - virtual void showMessageModal(const struct MessageModal& msg); + virtual void showMessageModal(const MessageModal& msg); public: ListenerMap m_listeners; From 0469eeefd4b78ac6af21747a8dd89a48ea3d64ac Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Fri, 6 Feb 2026 06:58:03 -0500 Subject: [PATCH 12/12] comment --- platforms/ios/AppPlatform_iOS.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/platforms/ios/AppPlatform_iOS.mm b/platforms/ios/AppPlatform_iOS.mm index e56a76737..d780029be 100644 --- a/platforms/ios/AppPlatform_iOS.mm +++ b/platforms/ios/AppPlatform_iOS.mm @@ -194,6 +194,7 @@ break; } + // this doesn't block the thread, it should UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title message:[NSString stringWithCString:msg.text.c_str()