mirror of https://github.com/encounter/SDL.git
Fix Indentation
This commit is contained in:
parent
5fa8a042ac
commit
f162d9ee23
|
@ -267,7 +267,7 @@ VITA_CreateWindow(_THIS, SDL_Window * window)
|
|||
#if defined(SDL_VIDEO_VITA_PVR)
|
||||
win.type = PSP2_DRAWABLE_TYPE_WINDOW;
|
||||
win.numFlipBuffers = 2;
|
||||
win.flipChainThrdAffinity = 0x20000;
|
||||
win.flipChainThrdAffinity = 0x20000;
|
||||
|
||||
/* 1088i for PSTV (Or Sharpscale) */
|
||||
if (window->w == 1920) {
|
||||
|
@ -279,7 +279,7 @@ VITA_CreateWindow(_THIS, SDL_Window * window)
|
|||
}
|
||||
/* 544p */
|
||||
else {
|
||||
win.windowSize = PSP2_WINDOW_960X544;
|
||||
win.windowSize = PSP2_WINDOW_960X544;
|
||||
}
|
||||
if ((window->flags & SDL_WINDOW_OPENGL) != 0) {
|
||||
wdata->egl_surface = SDL_EGL_CreateSurface(_this, &win);
|
||||
|
@ -425,37 +425,37 @@ void VITA_ImeEventHandler(void *arg, const SceImeEventData *e)
|
|||
SDL_VideoData *videodata = (SDL_VideoData *)arg;
|
||||
SDL_Scancode scancode;
|
||||
uint8_t utf8_buffer[SCE_IME_MAX_TEXT_LENGTH];
|
||||
switch (e->id) {
|
||||
case SCE_IME_EVENT_UPDATE_TEXT:
|
||||
if (e->param.text.caretIndex == 0) {
|
||||
switch (e->id) {
|
||||
case SCE_IME_EVENT_UPDATE_TEXT:
|
||||
if (e->param.text.caretIndex == 0) {
|
||||
scancode = SDL_GetScancodeFromKey(0x08);
|
||||
SDL_SendKeyboardKeyAutoRelease(scancode);
|
||||
sceImeSetText((SceWChar16 *)libime_initval, 4);
|
||||
}
|
||||
else {
|
||||
SDL_SendKeyboardKeyAutoRelease(scancode);
|
||||
sceImeSetText((SceWChar16 *)libime_initval, 4);
|
||||
}
|
||||
else {
|
||||
scancode = SDL_GetScancodeFromKey(*(SceWChar16 *)&libime_out[1]);
|
||||
if (scancode == SDL_SCANCODE_SPACE) {
|
||||
SDL_SendKeyboardKeyAutoRelease(SDL_SCANCODE_SPACE);
|
||||
}
|
||||
else {
|
||||
utf16_to_utf8((SceWChar16 *)&libime_out[1], utf8_buffer);
|
||||
SDL_SendKeyboardText((const char*)utf8_buffer);
|
||||
SDL_SendKeyboardText((const char*)utf8_buffer);
|
||||
}
|
||||
SDL_memset(&caret_rev, 0, sizeof(SceImeCaret));
|
||||
SDL_memset(&caret_rev, 0, sizeof(SceImeCaret));
|
||||
SDL_memset(libime_out, 0, ((SCE_IME_MAX_PREEDIT_LENGTH + SCE_IME_MAX_TEXT_LENGTH + 1) * sizeof(SceWChar16)));
|
||||
caret_rev.index = 1;
|
||||
sceImeSetCaret(&caret_rev);
|
||||
sceImeSetText((SceWChar16 *)libime_initval, 4);
|
||||
}
|
||||
break;
|
||||
case SCE_IME_EVENT_PRESS_ENTER:
|
||||
caret_rev.index = 1;
|
||||
sceImeSetCaret(&caret_rev);
|
||||
sceImeSetText((SceWChar16 *)libime_initval, 4);
|
||||
}
|
||||
break;
|
||||
case SCE_IME_EVENT_PRESS_ENTER:
|
||||
scancode = SDL_GetScancodeFromKey(0x0D);
|
||||
SDL_SendKeyboardKeyAutoRelease(scancode);
|
||||
case SCE_IME_EVENT_PRESS_CLOSE:
|
||||
SDL_SendKeyboardKeyAutoRelease(scancode);
|
||||
case SCE_IME_EVENT_PRESS_CLOSE:
|
||||
sceImeClose();
|
||||
videodata->ime_active = SDL_FALSE;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -474,22 +474,22 @@ void VITA_ShowScreenKeyboard(_THIS, SDL_Window *window)
|
|||
SDL_memset(libime_out, 0, ((SCE_IME_MAX_PREEDIT_LENGTH + SCE_IME_MAX_TEXT_LENGTH + 1) * sizeof(SceWChar16)));
|
||||
|
||||
param.supportedLanguages = SCE_IME_LANGUAGE_ENGLISH_US;
|
||||
param.languagesForced = SCE_FALSE;
|
||||
param.type = SCE_IME_TYPE_DEFAULT;
|
||||
param.option = SCE_IME_OPTION_NO_ASSISTANCE;
|
||||
param.inputTextBuffer = libime_out;
|
||||
param.maxTextLength = SCE_IME_MAX_TEXT_LENGTH;
|
||||
param.handler = VITA_ImeEventHandler;
|
||||
param.filter = NULL;
|
||||
param.initialText = (SceWChar16 *)libime_initval;
|
||||
param.arg = videodata;
|
||||
param.work = libime_work;
|
||||
param.languagesForced = SCE_FALSE;
|
||||
param.type = SCE_IME_TYPE_DEFAULT;
|
||||
param.option = SCE_IME_OPTION_NO_ASSISTANCE;
|
||||
param.inputTextBuffer = libime_out;
|
||||
param.maxTextLength = SCE_IME_MAX_TEXT_LENGTH;
|
||||
param.handler = VITA_ImeEventHandler;
|
||||
param.filter = NULL;
|
||||
param.initialText = (SceWChar16 *)libime_initval;
|
||||
param.arg = videodata;
|
||||
param.work = libime_work;
|
||||
|
||||
res = sceImeOpen(¶m);
|
||||
if (res < 0) {
|
||||
SDL_SetError("Failed to init IME");
|
||||
return;
|
||||
}
|
||||
res = sceImeOpen(¶m);
|
||||
if (res < 0) {
|
||||
SDL_SetError("Failed to init IME");
|
||||
return;
|
||||
}
|
||||
|
||||
#elif
|
||||
SceWChar16 *title = u"";
|
||||
|
|
Loading…
Reference in New Issue