diff --git a/binding-mri/binding-util.cpp b/binding-mri/binding-util.cpp index 4d4fd1f..825f376 100644 --- a/binding-mri/binding-util.cpp +++ b/binding-mri/binding-util.cpp @@ -82,7 +82,6 @@ static const RbException excToRbExc[] = void raiseRbExc(const Exception &exc){ RbData *data = getRbData(); VALUE excClass = data->exc[excToRbExc[exc.type]]; - rb_raise(excClass, "%s", exc.msg.c_str()); } diff --git a/src/settingsmenu.cpp b/src/settingsmenu.cpp index 48fc714..97d8172 100644 --- a/src/settingsmenu.cpp +++ b/src/settingsmenu.cpp @@ -477,19 +477,17 @@ struct SettingsMenuPrivate TTF_SetFontStyle(font, TTF_STYLE_NORMAL); } - SDL_Surface *createTextSurface(const char *str, bool bold) - { - SDL_Color c = { cText, cText, cText, 255 }; + SDL_Surface *createTextSurface(const char *str, bool bold){ + //SDL_Color c = { cText, cText, cText, 255 }; applyFontStyle(bold); - return TTF_RenderText_Blended(font, str, c); + return TTF_RenderText_Blended(font, str, strlen(str), c); } - SDL_Surface *createTextSurface(const char *str, SDL_Color c, - bool bold) + SDL_Surface *createTextSurface(const char *str, SDL_Color c, bool bold) { applyFontStyle(bold); - return TTF_RenderText_Blended(font, str, c); + return TTF_RenderText_Blended(font, str, strlen(str), c); } /* Horizontally centered */ @@ -1222,11 +1220,10 @@ bool SettingsMenu::onEvent(const SDL_Event &event, case SDL_EVENT_KEY_DOWN: if (p->state != AwaitingInput) { - if (event.key.sym == SDLK_RETURN) + if (event.key.key == SDLK_RETURN) p->onAccept(); - else if (event.key.sym == SDLK_ESCAPE) + else if (event.key.key == SDLK_ESCAPE) p->onCancel(); - return true; }