mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-20 18:28:14 +00:00
3DS: Support simple message boxes
This commit is contained in:

committed by
Sam Lantinga

parent
2bef8852fb
commit
fd9e57b71e
@@ -283,7 +283,7 @@ static SDL_AssertState SDLCALL SDL_PromptAssertion(const SDL_AssertData *data, v
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#elif defined(HAVE_STDIO_H)
|
#elif defined(HAVE_STDIO_H) && !defined(SDL_PLATFORM_3DS)
|
||||||
// this is a little hacky.
|
// this is a little hacky.
|
||||||
for (;;) {
|
for (;;) {
|
||||||
char buf[32];
|
char buf[32];
|
||||||
@@ -310,6 +310,8 @@ static SDL_AssertState SDLCALL SDL_PromptAssertion(const SDL_AssertData *data, v
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_WARNING, "Assertion Failed", message, window);
|
||||||
#endif // HAVE_STDIO_H
|
#endif // HAVE_STDIO_H
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -59,6 +59,10 @@
|
|||||||
#include <emscripten.h>
|
#include <emscripten.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef SDL_PLATFORM_3DS
|
||||||
|
#include <3ds.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef SDL_PLATFORM_LINUX
|
#ifdef SDL_PLATFORM_LINUX
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
@@ -5518,6 +5522,23 @@ bool SDL_ShowSimpleMessageBox(SDL_MessageBoxFlags flags, const char *title, cons
|
|||||||
},
|
},
|
||||||
title, message);
|
title, message);
|
||||||
return true;
|
return true;
|
||||||
|
#elif defined(SDL_PLATFORM_3DS)
|
||||||
|
errorConf errCnf;
|
||||||
|
bool hasGpuRight;
|
||||||
|
|
||||||
|
// If the video subsystem has not been initialised, set up graphics temporarily
|
||||||
|
hasGpuRight = gspHasGpuRight();
|
||||||
|
if (!hasGpuRight)
|
||||||
|
gfxInitDefault();
|
||||||
|
|
||||||
|
errorInit(&errCnf, ERROR_TEXT_WORD_WRAP, CFG_LANGUAGE_EN);
|
||||||
|
errorText(&errCnf, message);
|
||||||
|
errorDisp(&errCnf);
|
||||||
|
|
||||||
|
if (!hasGpuRight)
|
||||||
|
gfxExit();
|
||||||
|
|
||||||
|
return true;
|
||||||
#else
|
#else
|
||||||
SDL_MessageBoxData data;
|
SDL_MessageBoxData data;
|
||||||
SDL_MessageBoxButtonData button;
|
SDL_MessageBoxButtonData button;
|
||||||
|
Reference in New Issue
Block a user