mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-02 22:28:45 +00:00
Fix building on windows
This commit is contained in:
parent
992ead2de5
commit
c1195fdb2b
2 changed files with 6 additions and 8 deletions
|
@ -180,10 +180,10 @@ struct OrbisImeKeycode {
|
||||||
u64 timestamp;
|
u64 timestamp;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef int (*OrbisImeTextFilter)(char16_t* outText, u32* outTextLength, const char16_t* srcText,
|
typedef PS4_SYSV_ABI int (*OrbisImeTextFilter)(char16_t* outText, u32* outTextLength, const char16_t* srcText,
|
||||||
u32 srcTextLength);
|
u32 srcTextLength);
|
||||||
|
|
||||||
typedef int (*OrbisImeExtKeyboardFilter)(const OrbisImeKeycode* srcKeycode, u16* outKeycode,
|
typedef PS4_SYSV_ABI int (*OrbisImeExtKeyboardFilter)(const OrbisImeKeycode* srcKeycode, u16* outKeycode,
|
||||||
u32* outStatus, void* reserved);
|
u32* outStatus, void* reserved);
|
||||||
|
|
||||||
struct OrbisImeDialogParam {
|
struct OrbisImeDialogParam {
|
||||||
|
|
|
@ -303,9 +303,9 @@ bool ImeDialogState::ConvertOrbisCharToUTF8(const char16_t orbis_char, char* utf
|
||||||
UNREACHABLE_MSG("UTF-8 character is never more than 4 bytes");
|
UNREACHABLE_MSG("UTF-8 character is never more than 4 bytes");
|
||||||
}
|
}
|
||||||
|
|
||||||
*utf8_char_len = WideCharToMultiByte(CP_UTF8, 0, reinterpret_cast<const wchar_t*>(&orbis_char), 1, utf8_char, 4, nullptr, nullptr);
|
utf8_char_len = WideCharToMultiByte(CP_UTF8, 0, reinterpret_cast<const wchar_t*>(&orbis_char), 1, utf8_char, 4, nullptr, nullptr);
|
||||||
|
|
||||||
return *utf8_char_len != 0;
|
return utf8_char_len != 0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -469,12 +469,10 @@ void ImeDialogUi::DrawInputText() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImeDialogUi::DrawMultiLineInputText() {
|
void ImeDialogUi::DrawMultiLineInputText() {
|
||||||
#pragma clang diagnostic push
|
ImGuiInputTextFlags flags = ImGuiInputTextFlags_CallbackCharFilter | static_cast<ImGuiInputTextFlags>(ImGuiInputTextFlags_Multiline);
|
||||||
#pragma clang diagnostic ignored "-Wdeprecated-enum-enum-conversion"
|
if (InputTextEx("##ImeDialogInput", state->placeholder, state->current_text, state->max_text_length, ImVec2(380.0f, 100.0f), flags, InputTextCallback, this)) {
|
||||||
if (InputTextEx("##ImeDialogInput", state->placeholder, state->current_text, state->max_text_length, ImVec2(380.0f, 100.0f), ImGuiInputTextFlags_CallbackCharFilter | ImGuiInputTextFlags_Multiline, InputTextCallback, this)) {
|
|
||||||
state->input_changed = true;
|
state->input_changed = true;
|
||||||
}
|
}
|
||||||
#pragma clang diagnostic pop
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int ImeDialogUi::InputTextCallback(ImGuiInputTextCallbackData* data) {
|
int ImeDialogUi::InputTextCallback(ImGuiInputTextCallbackData* data) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue