mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-26 03:55:37 +00:00
CLang fixes
This commit is contained in:
parent
3b662681cb
commit
2ac099264d
@ -364,13 +364,13 @@ const std::vector<Key> kSymbols2Layout = {
|
|||||||
//{3, 0, 1, 1, "←", "", KeyType::Symbols1Layout, {}},
|
//{3, 0, 1, 1, "←", "", KeyType::Symbols1Layout, {}},
|
||||||
{3, 1, 1, 1, "¢", "", KeyType::Text, {}},
|
{3, 1, 1, 1, "¢", "", KeyType::Text, {}},
|
||||||
{3, 2, 1, 1, "¤", "", KeyType::Text, {}},
|
{3, 2, 1, 1, "¤", "", KeyType::Text, {}},
|
||||||
{3, 3, 1, 1, "’", "", KeyType::Text, {}},//not sure
|
{3, 3, 1, 1, "’", "", KeyType::Text, {}}, // not sure
|
||||||
{3, 4, 1, 1, "‘", "", KeyType::Text, {}},//not sure
|
{3, 4, 1, 1, "‘", "", KeyType::Text, {}}, // not sure
|
||||||
{3, 5, 1, 1, "‛", "", KeyType::Text, {}},//not sure
|
{3, 5, 1, 1, "‛", "", KeyType::Text, {}}, // not sure
|
||||||
{3, 6, 1, 1, "‚", "", KeyType::Text, {}},//not sure
|
{3, 6, 1, 1, "‚", "", KeyType::Text, {}}, // not sure
|
||||||
{3, 7, 1, 1, "№", "", KeyType::Text, {}},
|
{3, 7, 1, 1, "№", "", KeyType::Text, {}},
|
||||||
{3, 8, 1, 1, "", "", KeyType::Disabled, {}},
|
{3, 8, 1, 1, "", "", KeyType::Disabled, {}},
|
||||||
{3, 9, 1, 1, "", "", KeyType::Disabled,{}},
|
{3, 9, 1, 1, "", "", KeyType::Disabled, {}},
|
||||||
|
|
||||||
// Row 5
|
// Row 5
|
||||||
{4, 0, 1, 1, "", "", KeyType::Disabled, {}},
|
{4, 0, 1, 1, "", "", KeyType::Disabled, {}},
|
||||||
|
@ -8,15 +8,15 @@
|
|||||||
#include <imgui.h>
|
#include <imgui.h>
|
||||||
|
|
||||||
enum class KeyType {
|
enum class KeyType {
|
||||||
Text, // Inserts character(s) into input buffer
|
Text, // Inserts character(s) into input buffer
|
||||||
Backspace, // Deletes last character
|
Backspace, // Deletes last character
|
||||||
Space, // Adds space
|
Space, // Adds space
|
||||||
Enter, // Submits input
|
Enter, // Submits input
|
||||||
Shift, // Toggle uppercase/lowercase
|
Shift, // Toggle uppercase/lowercase
|
||||||
Symbols1Layout, // Switch to symbols layout
|
Symbols1Layout, // Switch to symbols layout
|
||||||
Symbols2Layout, // Switch to symbols layout
|
Symbols2Layout, // Switch to symbols layout
|
||||||
TextLayout, // Switch to text layout
|
TextLayout, // Switch to text layout
|
||||||
Done, // Finish and close keyboard
|
Done, // Finish and close keyboard
|
||||||
CursorLeft,
|
CursorLeft,
|
||||||
CursorRight,
|
CursorRight,
|
||||||
CursorUp,
|
CursorUp,
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <imgui.h>
|
#include <imgui.h>
|
||||||
|
#include "ime_common.h"
|
||||||
#include "ime_keyboard_layouts.h"
|
#include "ime_keyboard_layouts.h"
|
||||||
#include "ime_keyboard_ui.h"
|
#include "ime_keyboard_ui.h"
|
||||||
#include "ime_ui.h" // for ImeState
|
#include "ime_ui.h" // for ImeState
|
||||||
#include "ime_common.h"
|
|
||||||
|
|
||||||
using namespace ImGui;
|
using namespace ImGui;
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ void RenderKeyboardLayout(const std::vector<Key>& layout, char* buffer, std::siz
|
|||||||
break;
|
break;
|
||||||
case KeyType::ToggleKeyboard:
|
case KeyType::ToggleKeyboard:
|
||||||
kb_mode = (kb_mode == KeyboardMode::Letters1) ? KeyboardMode::Symbols1
|
kb_mode = (kb_mode == KeyboardMode::Letters1) ? KeyboardMode::Symbols1
|
||||||
: KeyboardMode::Letters1;
|
: KeyboardMode::Letters1;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -6,19 +6,18 @@
|
|||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "core/libraries/pad/pad.h"
|
|
||||||
#include "ime_keyboard_layouts.h"
|
|
||||||
#include "core/libraries/ime/ime.h"
|
#include "core/libraries/ime/ime.h"
|
||||||
|
#include "core/libraries/ime/ime_common.h"
|
||||||
#include "core/libraries/ime/ime_error.h"
|
#include "core/libraries/ime/ime_error.h"
|
||||||
#include "core/libraries/ime/ime_ui.h"
|
#include "core/libraries/ime/ime_ui.h"
|
||||||
#include "core/libraries/ime/ime_common.h"
|
#include "core/libraries/pad/pad.h"
|
||||||
|
#include "ime_keyboard_layouts.h"
|
||||||
|
|
||||||
enum class KeyboardMode { Letters1, Letters2, Symbols1, Symbols2 };
|
enum class KeyboardMode { Letters1, Letters2, Symbols1, Symbols2 };
|
||||||
|
|
||||||
void DrawVirtualKeyboard(char* buffer, std::size_t buffer_capacity, bool* input_changed,
|
void DrawVirtualKeyboard(char* buffer, std::size_t buffer_capacity, bool* input_changed,
|
||||||
KeyboardMode& kb_mode, bool& shift_enabled, bool* done_pressed);
|
KeyboardMode& kb_mode, bool& shift_enabled, bool* done_pressed);
|
||||||
|
|
||||||
|
|
||||||
void RenderKeyboardLayout(const std::vector<Key>& layout, char* buffer, std::size_t buffer_capacity,
|
void RenderKeyboardLayout(const std::vector<Key>& layout, char* buffer, std::size_t buffer_capacity,
|
||||||
bool* input_changed, KeyboardMode& kb_mode, bool& shift_enabled,
|
bool* input_changed, KeyboardMode& kb_mode, bool& shift_enabled,
|
||||||
bool* done_pressed);
|
bool* done_pressed);
|
@ -230,10 +230,6 @@ void ImeUi::DrawKeyboard() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int ImeUi::InputTextCallback(ImGuiInputTextCallbackData* data) {
|
int ImeUi::InputTextCallback(ImGuiInputTextCallbackData* data) {
|
||||||
ImeUi* ui = static_cast<ImeUi*>(data->UserData);
|
ImeUi* ui = static_cast<ImeUi*>(data->UserData);
|
||||||
ASSERT(ui);
|
ASSERT(ui);
|
||||||
|
@ -69,7 +69,7 @@ void Initialize(const ::Vulkan::Instance& instance, const Frontend::WindowSDL& w
|
|||||||
rb.AddRanges(io.Fonts->GetGlyphRangesKorean());
|
rb.AddRanges(io.Fonts->GetGlyphRangesKorean());
|
||||||
rb.AddRanges(io.Fonts->GetGlyphRangesJapanese());
|
rb.AddRanges(io.Fonts->GetGlyphRangesJapanese());
|
||||||
rb.AddRanges(io.Fonts->GetGlyphRangesCyrillic());
|
rb.AddRanges(io.Fonts->GetGlyphRangesCyrillic());
|
||||||
//For keyboard
|
// For keyboard
|
||||||
rb.AddChar(U'×');
|
rb.AddChar(U'×');
|
||||||
rb.AddChar(U'○');
|
rb.AddChar(U'○');
|
||||||
rb.AddChar(U'△');
|
rb.AddChar(U'△');
|
||||||
@ -104,7 +104,6 @@ void Initialize(const ::Vulkan::Instance& instance, const Frontend::WindowSDL& w
|
|||||||
rb.AddChar(U'‚');
|
rb.AddChar(U'‚');
|
||||||
rb.AddChar(U'№');
|
rb.AddChar(U'№');
|
||||||
|
|
||||||
|
|
||||||
ImVector<ImWchar> ranges{};
|
ImVector<ImWchar> ranges{};
|
||||||
rb.BuildRanges(&ranges);
|
rb.BuildRanges(&ranges);
|
||||||
ImFontConfig font_cfg{};
|
ImFontConfig font_cfg{};
|
||||||
|
Loading…
Reference in New Issue
Block a user