Skip to content

Commit

Permalink
Properly detecting CANCELED status.
Browse files Browse the repository at this point in the history
Properly detecting CANCELED status.
  • Loading branch information
Rinnegatamante committed Aug 28, 2016
1 parent b8833f8 commit 0d748c2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions source/luaKeyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@
#include <unistd.h>
#include "include/luaplayer.h"
#include "include/utils.h"
#include <psp2/types.h>
#include <psp2/message_dialog.h>
#include <psp2/ime_dialog.h>
#include <vitasdk.h>

#define stringify(str) #str
#define VariableRegister(lua, value) do { lua_pushinteger(lua, value); lua_setglobal (lua, stringify(value)); } while(0)
Expand Down Expand Up @@ -99,7 +97,7 @@ static int lua_state(lua_State *L){
SceImeDialogResult result;
memset(&result, 0, sizeof(SceImeDialogResult));
sceImeDialogGetResult(&result);
if (result.button == SCE_IME_DIALOG_BUTTON_CLOSE) {
if (result.button != SCE_IME_DIALOG_BUTTON_ENTER) {
status = (SceCommonDialogStatus)CANCELED;
}
}
Expand Down

0 comments on commit 0d748c2

Please sign in to comment.