3DS: Support simple message boxes
(cherry picked from commit 23d456e146)
This commit is contained in:
1 parent
b58a1c7f33
commit
bbcc9421d6
2 files changed
+24
-1
No files matched your search
+3
-1
@@ -292,7 +292,7 @@ static SDL_assert_state SDLCALL SDL_PromptAssertion(const SDL_assert_data *data,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#elif defined(HAVE_STDIO_H)
|
#elif defined(HAVE_STDIO_H) && !defined(__3DS__)
|
||||||
/* this is a little hacky. */
|
/* this is a little hacky. */
|
||||||
for (;;) {
|
for (;;) {
|
||||||
char buf[32];
|
char buf[32];
|
||||||
@@ -319,6 +319,8 @@ static SDL_assert_state SDLCALL SDL_PromptAssertion(const SDL_assert_data *data,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_WARNING, "Assertion Failed", message, window);
|
||||||
#endif /* HAVE_STDIO_H */
|
#endif /* HAVE_STDIO_H */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,10 @@
|
|||||||
#include <emscripten.h>
|
#include <emscripten.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __3DS__
|
||||||
|
#include <3ds.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __LINUX__
|
#ifdef __LINUX__
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
@@ -4542,6 +4546,23 @@ int SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *messag
|
|||||||
},
|
},
|
||||||
title, message);
|
title, message);
|
||||||
return 0;
|
return 0;
|
||||||
|
#elif defined(__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 0;
|
||||||
#else
|
#else
|
||||||
SDL_MessageBoxData data;
|
SDL_MessageBoxData data;
|
||||||
SDL_MessageBoxButtonData button;
|
SDL_MessageBoxButtonData button;
|
||||||
|
|||||||
Reference in new issue
Block a user