Use game title to display error messages

This commit is contained in:
Roza 2020-03-03 23:47:17 -05:00
parent 75d9bb5f19
commit 4dcae82bb1

View file

@ -396,13 +396,17 @@ int main(int argc, char *argv[]) {
SDL_WaitThread(rgssThread, 0); SDL_WaitThread(rgssThread, 0);
else else
SDL_ShowSimpleMessageBox( SDL_ShowSimpleMessageBox(
SDL_MESSAGEBOX_ERROR, conf.windowTitle.c_str(), SDL_MESSAGEBOX_ERROR, conf.game.title.c_str(),
"The RGSS script seems to be stuck and mkxp will now force quit", [OFString
stringWithFormat:
@"The RGSS script seems to be stuck. %s will now force quit.",
conf.game.title.c_str()]
.UTF8String,
win); win);
if (!rtData.rgssErrorMsg.empty()) { if (!rtData.rgssErrorMsg.empty()) {
Debug() << rtData.rgssErrorMsg; Debug() << rtData.rgssErrorMsg;
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, conf.windowTitle.c_str(), SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, conf.game.title.c_str(),
rtData.rgssErrorMsg.c_str(), win); rtData.rgssErrorMsg.c_str(), win);
} }