From e7f9ab9797ad32c4f07dfe82d7e6c811f9317c9b Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Wed, 10 Jul 2024 19:48:14 +1000 Subject: [PATCH] Wii/Dreamcast: Display crosshairs at cursor position --- src/LBackend.c | 57 ++++++++++++++++++++++------------------- src/LBackend.h | 13 ++++++++-- src/LBackend_Android.c | 2 +- src/LBackend_ios.m | 2 +- src/LScreens.c | 10 ++++---- src/LWidgets.c | 10 ++++---- src/VirtualCursor.h | 34 ++++++++++++++++++++++++ src/VirtualKeyboard.h | 18 ++++++------- src/Window_BeOS.cpp | 1 - src/Window_Dreamcast.c | 14 +++++++--- src/Window_GCWii.c | 7 ++--- src/Window_MacClassic.c | 1 - src/Window_N64.c | 3 ++- src/Window_NDS.c | 1 - src/Window_PS1.c | 1 - src/Window_PS2.c | 4 --- src/Window_PS3.c | 4 --- src/Window_PSP.c | 4 --- src/Window_PSVita.c | 1 - src/Window_SDL2.c | 1 - src/Window_SDL3.c | 1 - src/Window_Saturn.c | 1 - src/Window_Switch.c | 1 - src/Window_Terminal.c | 1 - src/Window_Web.c | 1 - src/Window_WiiU.cpp | 1 - src/Window_Win.c | 1 - src/Window_Xbox.c | 4 --- src/Window_Xbox360.c | 4 --- src/Window_cocoa.m | 1 - 30 files changed, 110 insertions(+), 94 deletions(-) create mode 100644 src/VirtualCursor.h diff --git a/src/LBackend.c b/src/LBackend.c index 7664096f3..9d8734b8f 100644 --- a/src/LBackend.c +++ b/src/LBackend.c @@ -33,8 +33,9 @@ struct FontDesc titleFont, textFont, hintFont, logoFont, rowFont; static struct Context2D framebuffer; /* The area/region of the window that needs to be redrawn and presented to the screen. */ /* If width is 0, means no area needs to be redrawn. */ -Rect2D dirty_rect; +static Rect2D dirty_rect; +LBackend_DrawHook LBackend_Hooks[4]; static cc_uint8 pendingRedraw; #define REDRAW_ALL 0x02 #define REDRAW_SOME 0x01 @@ -179,20 +180,18 @@ void LBackend_LayoutWidget(struct LWidget* w) { LBackend_TableReposition((struct LTable*)w); } -void LBackend_MarkDirty(void* widget) { +void LBackend_NeedsRedraw(void* widget) { struct LWidget* w = (struct LWidget*)widget; pendingRedraw |= REDRAW_SOME; w->dirty = true; } -/* Marks the entire window as needing to be redrawn. */ -static CC_NOINLINE void MarkAllDirty(void) { +void LBackend_MarkAllDirty(void) { dirty_rect.x = 0; dirty_rect.width = framebuffer.width; dirty_rect.y = 0; dirty_rect.height = framebuffer.height; } -/* Marks the given area/region as needing to be redrawn. */ -static CC_NOINLINE void MarkAreaDirty(int x, int y, int width, int height) { +void LBackend_MarkAreaDirty(int x, int y, int width, int height) { int x1, y1, x2, y2; if (!Drawer2D_Clamp(&framebuffer, &x, &y, &width, &height)) return; @@ -253,7 +252,7 @@ static CC_NOINLINE void DrawWidget(struct LWidget* w) { w->dirty = false; w->VTABLE->Draw(w); - MarkAreaDirty(w->x, w->y, w->width, w->height); + LBackend_MarkAreaDirty(w->x, w->y, w->width, w->height); } static CC_NOINLINE void RedrawAll(void) { @@ -264,7 +263,7 @@ static CC_NOINLINE void RedrawAll(void) { for (i = 0; i < s->numWidgets; i++) { DrawWidget(s->widgets[i]); } - MarkAllDirty(); + LBackend_MarkAllDirty(); } static CC_NOINLINE void RedrawDirty(void) { @@ -280,7 +279,7 @@ static CC_NOINLINE void RedrawDirty(void) { if (!w->opaque || w->last.width > w->width || w->last.height > w->height) { s->ResetArea(&framebuffer, w->last.x, w->last.y, w->last.width, w->last.height); - MarkAreaDirty(w->last.x, w->last.y, w->last.width, w->last.height); + LBackend_MarkAreaDirty(w->last.x, w->last.y, w->last.width, w->last.height); } DrawWidget(w); } @@ -298,16 +297,20 @@ static CC_NOINLINE void DoRedraw(void) { void LBackend_Redraw(void) { pendingRedraw = REDRAW_ALL; - MarkAllDirty(); + LBackend_MarkAllDirty(); } void LBackend_ThemeChanged(void) { LBackend_Redraw(); } void LBackend_Tick(void) { + int i; DoRedraw(); if (!dirty_rect.width) return; - OnscreenKeyboard_Draw2D(&dirty_rect, &framebuffer.bmp); - Window_DrawFramebuffer(dirty_rect, &framebuffer.bmp); + for (i = 0; i < Array_Elems(LBackend_Hooks); i++) + { + if (LBackend_Hooks[i]) LBackend_Hooks[i](&framebuffer); + } + Window_DrawFramebuffer(dirty_rect, &framebuffer.bmp); dirty_rect.x = 0; dirty_rect.width = 0; dirty_rect.y = 0; dirty_rect.height = 0; @@ -439,7 +442,7 @@ void LBackend_ButtonInit(struct LButton* w, int width, int height) { void LBackend_ButtonUpdate(struct LButton* w) { struct DrawTextArgs args; DrawTextArgs_Make(&args, &w->text, &titleFont, true); - LBackend_MarkDirty(w); + LBackend_NeedsRedraw(w); w->_textWidth = Drawer2D_TextWidth(&args); w->_textHeight = Drawer2D_TextHeight(&args); @@ -471,7 +474,7 @@ void LBackend_ButtonDraw(struct LButton* w) { static void LCheckbox_OnClick(void* w) { struct LCheckbox* cb = (struct LCheckbox*)w; - LBackend_MarkDirty(cb); + LBackend_NeedsRedraw(cb); cb->value = !cb->value; if (cb->ValueChanged) cb->ValueChanged(cb); @@ -487,7 +490,7 @@ void LBackend_CheckboxInit(struct LCheckbox* w) { } void LBackend_CheckboxUpdate(struct LCheckbox* w) { - LBackend_MarkDirty(w); + LBackend_NeedsRedraw(w); } /* Based off checkbox from original ClassiCube Launcher */ @@ -611,7 +614,7 @@ void LBackend_InputUpdate(struct LInput* w) { String_InitArray(text, textBuffer); LInput_UNSAFE_GetText(w, &text); - LBackend_MarkDirty(w); + LBackend_NeedsRedraw(w); DrawTextArgs_Make(&args, &text, &textFont, false); textWidth = Drawer2D_TextWidth(&args); @@ -688,10 +691,10 @@ void LBackend_InputTick(struct LInput* w) { if (Rect2D_Equals(r, lastCaretRect)) { /* Fast path, caret is blinking in same spot */ - MarkAreaDirty(r.x, r.y, r.width, r.height); + LBackend_MarkAreaDirty(r.x, r.y, r.width, r.height); } else { /* Slow path (new widget, caret moved, etc) */ - MarkAreaDirty(w->x, w->y, w->width, w->height); + LBackend_MarkAreaDirty(w->x, w->y, w->width, w->height); } lastCaretRect = r; } @@ -700,7 +703,7 @@ void LBackend_InputSelect(struct LInput* w, int idx, cc_bool wasSelected) { caretStart = Stopwatch_Measure(); w->caretShow = true; LInput_MoveCaretToCursor(w, idx); - LBackend_MarkDirty(w); + LBackend_NeedsRedraw(w); if (Window_Main.SoftKeyboardInstant) LInput_OpenKeyboard(w); @@ -709,7 +712,7 @@ void LBackend_InputSelect(struct LInput* w, int idx, cc_bool wasSelected) { void LBackend_InputUnselect(struct LInput* w) { caretStart = 0; w->caretShow = false; - LBackend_MarkDirty(w); + LBackend_NeedsRedraw(w); OnscreenKeyboard_Close(); } @@ -821,7 +824,7 @@ void LBackend_LabelInit(struct LLabel* w) { } void LBackend_LabelUpdate(struct LLabel* w) { struct DrawTextArgs args; DrawTextArgs_Make(&args, &w->text, LLabel_GetFont(w), true); - LBackend_MarkDirty(w); + LBackend_NeedsRedraw(w); w->width = Drawer2D_TextWidth(&args); w->height = Drawer2D_TextHeight(&args); @@ -857,7 +860,7 @@ void LBackend_SliderInit(struct LSlider* w, int width, int height) { } void LBackend_SliderUpdate(struct LSlider* w) { - LBackend_MarkDirty(w); + LBackend_NeedsRedraw(w); } static void LSlider_DrawBoxBounds(struct LSlider* w) { @@ -933,7 +936,7 @@ void LBackend_TableReposition(struct LTable* w) { void LBackend_TableFlagAdded(struct LTable* w) { /* TODO: Only redraw flags */ - LBackend_MarkDirty(w); + LBackend_NeedsRedraw(w); } /* Draws background behind column headers */ @@ -1087,7 +1090,7 @@ void LBackend_TableDraw(struct LTable* w) { LTable_DrawHeaders(w); LTable_DrawRows(w); LTable_DrawScrollbar(w); - MarkAllDirty(); + LBackend_MarkAllDirty(); } @@ -1153,7 +1156,7 @@ void LBackend_TableMouseDown(struct LTable* w, int idx) { } else { LTable_RowsClick(w, idx); } - LBackend_MarkDirty(w); + LBackend_NeedsRedraw(w); } void LBackend_TableMouseMove(struct LTable* w, int idx) { @@ -1168,7 +1171,7 @@ void LBackend_TableMouseMove(struct LTable* w, int idx) { w->topRow = row; LTable_ClampTopRow(w); - LBackend_MarkDirty(w); + LBackend_NeedsRedraw(w); } else if (w->draggingColumn >= 0) { col = w->draggingColumn; width = x - w->dragXStart; @@ -1180,7 +1183,7 @@ void LBackend_TableMouseMove(struct LTable* w, int idx) { Math_Clamp(width, cellMinWidth, maxW - cellMinWidth); if (width == w->columns[col].width) return; w->columns[col].width = width; - LBackend_MarkDirty(w); + LBackend_NeedsRedraw(w); } } diff --git a/src/LBackend.h b/src/LBackend.h index 2ebb8ab82..d24d239b7 100644 --- a/src/LBackend.h +++ b/src/LBackend.h @@ -17,6 +17,9 @@ struct LSlider; struct LTable; struct Flag; +typedef void (*LBackend_DrawHook)(struct Context2D* ctx); +extern LBackend_DrawHook LBackend_Hooks[4]; + void LBackend_Init(void); void LBackend_Free(void); void LBackend_SetScreen(struct LScreen* s); @@ -27,12 +30,18 @@ void LBackend_DrawTitle(struct Context2D* ctx, const char* title); void LBackend_DecodeFlag(struct Flag* flag, cc_uint8* data, cc_uint32 len); -/* Resets pixels to default, then draws widgets of current screen over it */ +/* Marks the entire launcher contents as needing to be redrawn */ void LBackend_Redraw(void); +/* Marks the given widget as needing to be redrawn */ +void LBackend_NeedsRedraw(void* widget); +/* Marks the entire window as needing to be redrawn */ +void LBackend_MarkAllDirty(void); +/* Marks the given area/region as needing to be redrawn */ +void LBackend_MarkAreaDirty(int x, int y, int width, int height); + void LBackend_ThemeChanged(void); void LBackend_Tick(void); void LBackend_LayoutWidget(struct LWidget* w); -void LBackend_MarkDirty(void* widget); void LBackend_InitFramebuffer(void); void LBackend_FreeFramebuffer(void); diff --git a/src/LBackend_Android.c b/src/LBackend_Android.c index 32b302be7..2508912f8 100644 --- a/src/LBackend_Android.c +++ b/src/LBackend_Android.c @@ -81,7 +81,7 @@ void LBackend_LayoutWidget(struct LWidget* w) { LBackend_LayoutDimensions(w); } -void LBackend_MarkDirty(void* widget) { } +void LBackend_NeedsRedraw(void* widget) { } void LBackend_InitFramebuffer(void) { } void LBackend_FreeFramebuffer(void) { } diff --git a/src/LBackend_ios.m b/src/LBackend_ios.m index c7c77f469..cbf424ebb 100644 --- a/src/LBackend_ios.m +++ b/src/LBackend_ios.m @@ -225,7 +225,7 @@ void LBackend_Init(void) { CFBridgingRetain(ui_controller); // prevent GC TODO even needed? } -void LBackend_MarkDirty(void* widget) { } +void LBackend_NeedsRedraw(void* widget) { } void LBackend_Tick(void) { } void LBackend_Free(void) { } void LBackend_UpdateTitleFont(void) { } diff --git a/src/LScreens.c b/src/LScreens.c index 695b68954..0f9ab6566 100644 --- a/src/LScreens.c +++ b/src/LScreens.c @@ -1296,19 +1296,19 @@ static void ServersScreen_HashFilter(cc_string* str) { static void ServersScreen_SearchChanged(struct LInput* w) { struct ServersScreen* s = &ServersScreen; LTable_ApplyFilter(&s->table); - LBackend_MarkDirty(&s->table); + LBackend_NeedsRedraw(&s->table); } static void ServersScreen_HashChanged(struct LInput* w) { struct ServersScreen* s = &ServersScreen; LTable_ShowSelected(&s->table); - LBackend_MarkDirty(&s->table); + LBackend_NeedsRedraw(&s->table); } static void ServersScreen_OnSelectedChanged(void) { struct ServersScreen* s = &ServersScreen; - LBackend_MarkDirty(&s->iptHash); - LBackend_MarkDirty(&s->table); + LBackend_NeedsRedraw(&s->iptHash); + LBackend_NeedsRedraw(&s->table); } static void ServersScreen_ReloadServers(struct ServersScreen* s) { @@ -1375,7 +1375,7 @@ static void ServersScreen_Tick(struct LScreen* s_) { if (FetchServersTask.Base.success) { ServersScreen_ReloadServers(s); - LBackend_MarkDirty(&s->table); + LBackend_NeedsRedraw(&s->table); } LButton_SetConst(&s->btnRefresh, diff --git a/src/LWidgets.c b/src/LWidgets.c index a1cdfbd61..38d616679 100644 --- a/src/LWidgets.c +++ b/src/LWidgets.c @@ -125,12 +125,12 @@ static void LButton_Draw(void* widget) { static void LButton_Hover(void* w, int idx, cc_bool wasOver) { /* only need to redraw when changing from unhovered to active */ - if (!wasOver) LBackend_MarkDirty(w); + if (!wasOver) LBackend_NeedsRedraw(w); } -static void LButton_Unhover(void* w) { LBackend_MarkDirty(w); } -static void LButton_OnSelect(void* w, int idx, cc_bool wasSelected) { LBackend_MarkDirty(w); } -static void LButton_OnUnselect(void* w, int idx) { LBackend_MarkDirty(w); } +static void LButton_Unhover(void* w) { LBackend_NeedsRedraw(w); } +static void LButton_OnSelect(void* w, int idx, cc_bool wasSelected) { LBackend_NeedsRedraw(w); } +static void LButton_OnUnselect(void* w, int idx) { LBackend_NeedsRedraw(w); } static const struct LWidgetVTABLE lbutton_VTABLE = { LButton_Draw, NULL, @@ -651,7 +651,7 @@ static void LTable_MouseWheel(void* widget, float delta) { struct LTable* w = (struct LTable*)widget; w->topRow -= Utils_AccumulateWheelDelta(&w->_wheelAcc, delta); LTable_ClampTopRow(w); - LBackend_MarkDirty(w); + LBackend_NeedsRedraw(w); w->_lastRow = -1; } diff --git a/src/VirtualCursor.h b/src/VirtualCursor.h new file mode 100644 index 000000000..0c5979a8f --- /dev/null +++ b/src/VirtualCursor.h @@ -0,0 +1,34 @@ +#include "Core.h" +#include "Funcs.h" +#include "Drawer2D.h" +#include "Input.h" +#include "LBackend.h" + +#define CURSOR_SIZE 1 +#define CURSOR_EXTENT 5 + +static void VirtualCursor_Display2D(struct Context2D* ctx) { + int x, y; + LBackend_MarkAllDirty(); + + x = Pointers[0].x; + y = Pointers[0].y; + + Context2D_Clear(ctx, BITMAPCOLOR_WHITE, + x - CURSOR_EXTENT, y - CURSOR_SIZE, CURSOR_EXTENT * 2, CURSOR_SIZE * 3); + Context2D_Clear(ctx, BITMAPCOLOR_WHITE, + x - CURSOR_SIZE, y - CURSOR_EXTENT, CURSOR_SIZE * 3, CURSOR_EXTENT * 2); +} + +static void VirtualCursor_SetPosition(int x, int y) { + x = max(0, min(x, Window_Main.Width - 1)); + y = max(0, min(y, Window_Main.Height - 1)); + + if (x == Pointers[0].x && y == Pointers[0].y) return; + Pointer_SetPosition(0, x, y); + LBackend_Hooks[3] = VirtualCursor_Display2D; + + /* TODO better dirty region tracking */ + if (launcherMode) LBackend_Redraw(); +} + diff --git a/src/VirtualKeyboard.h b/src/VirtualKeyboard.h index b78deba3c..03a7e279f 100644 --- a/src/VirtualKeyboard.h +++ b/src/VirtualKeyboard.h @@ -285,21 +285,19 @@ static void VirtualKeyboard_PadAxis(void* obj, int port, int axis, float x, floa extern Rect2D dirty_rect; static void VirtualKeyboard_MarkDirty2D(void) { - if (!dirty_rect.width) dirty_rect.width = 2; + LBackend_MarkAllDirty(); } -static void VirtualKeyboard_Display2D(Rect2D* r, struct Bitmap* bmp) { +static void VirtualKeyboard_Display2D(struct Context2D* real_ctx) { struct Context2D ctx; - struct Bitmap copy = *bmp; + struct Bitmap copy = real_ctx->bmp; int x, y; + if (!DisplayInfo.ShowingSoftKeyboard) return; + LBackend_MarkAllDirty(); - /* Mark entire framebuffer as needing to be redrawn */ - r->x = 0; r->width = bmp->width; - r->y = 0; r->height = bmp->height; - - VirtualKeyboard_CalcPosition(&x, &y, bmp->width, bmp->height); - copy.scan0 = Bitmap_GetRow(bmp, y); + VirtualKeyboard_CalcPosition(&x, &y, copy.width, copy.height); + copy.scan0 = Bitmap_GetRow(&real_ctx->bmp, y); copy.scan0 += x; Context2D_Wrap(&ctx, ©); @@ -307,6 +305,7 @@ static void VirtualKeyboard_Display2D(Rect2D* r, struct Bitmap* bmp) { } static void VirtualKeyboard_Close2D(void) { + LBackend_Hooks[0] = NULL; LBackend_Redraw(); } @@ -400,6 +399,7 @@ static void VirtualKeyboard_Open(struct OpenKeyboardArgs* args, cc_bool launcher Window_Main.SoftKeyboardFocus = true; Input.DownHook = VirtualKeyboard_ProcessDown; + LBackend_Hooks[0] = VirtualKeyboard_Display2D; } static void VirtualKeyboard_SetText(const cc_string* text) { diff --git a/src/Window_BeOS.cpp b/src/Window_BeOS.cpp index 42e59a1e0..0f3cab12b 100644 --- a/src/Window_BeOS.cpp +++ b/src/Window_BeOS.cpp @@ -681,7 +681,6 @@ void Window_FreeFramebuffer(struct Bitmap* bmp) { void OnscreenKeyboard_Open(struct OpenKeyboardArgs* args) { } void OnscreenKeyboard_SetText(const cc_string* text) { } -void OnscreenKeyboard_Draw2D(Rect2D* r, struct Bitmap* bmp) { } void OnscreenKeyboard_Draw3D(void) { } void OnscreenKeyboard_Close(void) { } diff --git a/src/Window_Dreamcast.c b/src/Window_Dreamcast.c index 93aa044da..625c13339 100644 --- a/src/Window_Dreamcast.c +++ b/src/Window_Dreamcast.c @@ -12,7 +12,10 @@ #include "ExtMath.h" #include "VirtualKeyboard.h" #include + static cc_bool launcherMode; +static cc_bool vc_hooked; +#include "VirtualCursor.h" cc_bool window_inited; struct _DisplayData DisplayInfo; @@ -200,6 +203,13 @@ static void ProcessMouseInput(float delta) { Input_SetNonRepeatable(CCMOUSE_L, mods & MOUSE_LEFTBUTTON); Input_SetNonRepeatable(CCMOUSE_R, mods & MOUSE_RIGHTBUTTON); Input_SetNonRepeatable(CCMOUSE_M, mods & MOUSE_SIDEBUTTON); + + /* Start cursor at window middle */ + if (!vc_hooked) { + vc_hooked = true; + Pointer_SetPosition(0, Window_Main.Width / 2, Window_Main.Height / 2); + } + VirtualCursor_SetPosition(Pointers[0].x + state->dx, Pointers[0].y + state->dy); if (!Input.RawMode) return; float scale = (delta * 60.0) / 2.0f; @@ -340,10 +350,6 @@ void OnscreenKeyboard_SetText(const cc_string* text) { VirtualKeyboard_SetText(text); } -void OnscreenKeyboard_Draw2D(Rect2D* r, struct Bitmap* bmp) { - VirtualKeyboard_Display2D(r, bmp); -} - void OnscreenKeyboard_Draw3D(void) { VirtualKeyboard_Display3D(); } diff --git a/src/Window_GCWii.c b/src/Window_GCWii.c index 609e17824..4900d290a 100644 --- a/src/Window_GCWii.c +++ b/src/Window_GCWii.c @@ -20,6 +20,7 @@ static cc_bool needsFBUpdate; static cc_bool launcherMode; +#include "VirtualCursor.h" static void* xfb; static GXRModeObj* rmode; void* Window_XFB; @@ -268,7 +269,7 @@ static void ProcessWPADDrag(int res, u32 mods) { } else { dragActive = false; } - Pointer_SetPosition(0, x, y); + VirtualCursor_SetPosition(x, y); } #define FACTOR 2 @@ -525,10 +526,6 @@ void OnscreenKeyboard_SetText(const cc_string* text) { VirtualKeyboard_SetText(text); } -void OnscreenKeyboard_Draw2D(Rect2D* r, struct Bitmap* bmp) { - VirtualKeyboard_Display2D(r, bmp); -} - void OnscreenKeyboard_Draw3D(void) { VirtualKeyboard_Display3D(); } diff --git a/src/Window_MacClassic.c b/src/Window_MacClassic.c index d3c237120..9aabbde00 100644 --- a/src/Window_MacClassic.c +++ b/src/Window_MacClassic.c @@ -518,7 +518,6 @@ void Window_FreeFramebuffer(struct Bitmap* bmp) { void OnscreenKeyboard_Open(struct OpenKeyboardArgs* args) { } void OnscreenKeyboard_SetText(const cc_string* text) { } -void OnscreenKeyboard_Draw2D(Rect2D* r, struct Bitmap* bmp) { } void OnscreenKeyboard_Draw3D(void) { } void OnscreenKeyboard_Close(void) { } diff --git a/src/Window_N64.c b/src/Window_N64.c index 2aaa740d4..2f28f25c5 100644 --- a/src/Window_N64.c +++ b/src/Window_N64.c @@ -3,6 +3,7 @@ #include "Window.h" #include "Platform.h" #include "Input.h" +#include "InputHandler.h" #include "Event.h" #include "Graphics.h" #include "String.h" @@ -139,7 +140,7 @@ void Gamepads_Process(float delta) { for (int i = 0; i < INPUT_MAX_GAMEPADS; i++) { - if (!joypad_is_connected(port)) continue; + if (!joypad_is_connected(i)) continue; int port = Gamepad_MapPort(i + 10); joypad_inputs_t inputs = joypad_get_inputs(i); diff --git a/src/Window_NDS.c b/src/Window_NDS.c index 2e3da1d79..6592ce516 100644 --- a/src/Window_NDS.c +++ b/src/Window_NDS.c @@ -323,7 +323,6 @@ void OnscreenKeyboard_Open(struct OpenKeyboardArgs* args) { void OnscreenKeyboard_SetText(const cc_string* text) { } -void OnscreenKeyboard_Draw2D(Rect2D* r, struct Bitmap* bmp) { } void OnscreenKeyboard_Draw3D(void) { } void OnscreenKeyboard_Close(void) { diff --git a/src/Window_PS1.c b/src/Window_PS1.c index 31e93f9b3..8534904a1 100644 --- a/src/Window_PS1.c +++ b/src/Window_PS1.c @@ -193,7 +193,6 @@ void Window_FreeFramebuffer(struct Bitmap* bmp) { *#########################################################################################################################*/ void OnscreenKeyboard_Open(struct OpenKeyboardArgs* args) { /* TODO implement */ } void OnscreenKeyboard_SetText(const cc_string* text) { } -void OnscreenKeyboard_Draw2D(Rect2D* r, struct Bitmap* bmp) { } void OnscreenKeyboard_Draw3D(void) { } void OnscreenKeyboard_Close(void) { /* TODO implement */ } diff --git a/src/Window_PS2.c b/src/Window_PS2.c index c82303f1c..5aeee2f02 100644 --- a/src/Window_PS2.c +++ b/src/Window_PS2.c @@ -316,10 +316,6 @@ void OnscreenKeyboard_SetText(const cc_string* text) { VirtualKeyboard_SetText(text); } -void OnscreenKeyboard_Draw2D(Rect2D* r, struct Bitmap* bmp) { - VirtualKeyboard_Display2D(r, bmp); -} - void OnscreenKeyboard_Draw3D(void) { VirtualKeyboard_Display3D(); } diff --git a/src/Window_PS3.c b/src/Window_PS3.c index b3cbc0223..51f6c28cb 100644 --- a/src/Window_PS3.c +++ b/src/Window_PS3.c @@ -378,10 +378,6 @@ void OnscreenKeyboard_SetText(const cc_string* text) { VirtualKeyboard_SetText(text); } -void OnscreenKeyboard_Draw2D(Rect2D* r, struct Bitmap* bmp) { - VirtualKeyboard_Display2D(r, bmp); -} - void OnscreenKeyboard_Draw3D(void) { VirtualKeyboard_Display3D(); } diff --git a/src/Window_PSP.c b/src/Window_PSP.c index 35e9d7a82..a2091bd0a 100644 --- a/src/Window_PSP.c +++ b/src/Window_PSP.c @@ -179,10 +179,6 @@ void OnscreenKeyboard_SetText(const cc_string* text) { VirtualKeyboard_SetText(text); } -void OnscreenKeyboard_Draw2D(Rect2D* r, struct Bitmap* bmp) { - VirtualKeyboard_Display2D(r, bmp); -} - void OnscreenKeyboard_Draw3D(void) { VirtualKeyboard_Display3D(); } diff --git a/src/Window_PSVita.c b/src/Window_PSVita.c index edf6e4887..c7d6f04b2 100644 --- a/src/Window_PSVita.c +++ b/src/Window_PSVita.c @@ -351,7 +351,6 @@ void OnscreenKeyboard_Open(struct OpenKeyboardArgs* args) { /* TODO implement */ } void OnscreenKeyboard_SetText(const cc_string* text) { } -void OnscreenKeyboard_Draw2D(Rect2D* r, struct Bitmap* bmp) { } void OnscreenKeyboard_Draw3D(void) { } void OnscreenKeyboard_Close(void) { /* TODO implement */ } diff --git a/src/Window_SDL2.c b/src/Window_SDL2.c index 4c33ae61f..7f11de2dd 100644 --- a/src/Window_SDL2.c +++ b/src/Window_SDL2.c @@ -445,7 +445,6 @@ void Window_FreeFramebuffer(struct Bitmap* bmp) { void OnscreenKeyboard_Open(struct OpenKeyboardArgs* args) { SDL_StartTextInput(); } void OnscreenKeyboard_SetText(const cc_string* text) { } -void OnscreenKeyboard_Draw2D(Rect2D* r, struct Bitmap* bmp) { } void OnscreenKeyboard_Draw3D(void) { } void OnscreenKeyboard_Close(void) { SDL_StopTextInput(); } diff --git a/src/Window_SDL3.c b/src/Window_SDL3.c index 07dc18254..e4d715498 100644 --- a/src/Window_SDL3.c +++ b/src/Window_SDL3.c @@ -477,7 +477,6 @@ void Window_FreeFramebuffer(struct Bitmap* bmp) { void OnscreenKeyboard_Open(struct OpenKeyboardArgs* args) { SDL_StartTextInput(win_handle); } void OnscreenKeyboard_SetText(const cc_string* text) { } -void OnscreenKeyboard_Draw2D(Rect2D* r, struct Bitmap* bmp) { } void OnscreenKeyboard_Draw3D(void) { } void OnscreenKeyboard_Close(void) { SDL_StopTextInput(win_handle); } diff --git a/src/Window_Saturn.c b/src/Window_Saturn.c index 7b03a695b..f10bb3738 100644 --- a/src/Window_Saturn.c +++ b/src/Window_Saturn.c @@ -233,7 +233,6 @@ void Window_FreeFramebuffer(struct Bitmap* bmp) { *#########################################################################################################################*/ void OnscreenKeyboard_Open(struct OpenKeyboardArgs* args) { /* TODO implement */ } void OnscreenKeyboard_SetText(const cc_string* text) { } -void OnscreenKeyboard_Draw2D(Rect2D* r, struct Bitmap* bmp) { } void OnscreenKeyboard_Draw3D(void) { } void OnscreenKeyboard_Close(void) { /* TODO implement */ } diff --git a/src/Window_Switch.c b/src/Window_Switch.c index d8d4da5c0..960606f96 100644 --- a/src/Window_Switch.c +++ b/src/Window_Switch.c @@ -291,7 +291,6 @@ void OnscreenKeyboard_Open(struct OpenKeyboardArgs* args) { swkbdClose(&kbd); } void OnscreenKeyboard_SetText(const cc_string* text) { } -void OnscreenKeyboard_Draw2D(Rect2D* r, struct Bitmap* bmp) { } void OnscreenKeyboard_Draw3D(void) { } void OnscreenKeyboard_Close(void) { /* TODO implement */ } diff --git a/src/Window_Terminal.c b/src/Window_Terminal.c index 9460b0240..fa955cdce 100644 --- a/src/Window_Terminal.c +++ b/src/Window_Terminal.c @@ -540,7 +540,6 @@ void Window_FreeFramebuffer(struct Bitmap* bmp) { void OnscreenKeyboard_Open(struct OpenKeyboardArgs* args) { } void OnscreenKeyboard_SetText(const cc_string* text) { } -void OnscreenKeyboard_Draw2D(Rect2D* r, struct Bitmap* bmp) { } void OnscreenKeyboard_Draw3D(void) { } void OnscreenKeyboard_Close(void) { } diff --git a/src/Window_Web.c b/src/Window_Web.c index 8365972bb..ddbb96d17 100644 --- a/src/Window_Web.c +++ b/src/Window_Web.c @@ -724,7 +724,6 @@ void OnscreenKeyboard_SetText(const cc_string* text) { interop_SetKeyboardText(str); } -void OnscreenKeyboard_Draw2D(Rect2D* r, struct Bitmap* bmp) { } void OnscreenKeyboard_Draw3D(void) { } void OnscreenKeyboard_Close(void) { diff --git a/src/Window_WiiU.cpp b/src/Window_WiiU.cpp index 0c68d65f7..999f533ce 100644 --- a/src/Window_WiiU.cpp +++ b/src/Window_WiiU.cpp @@ -602,7 +602,6 @@ static void OnscreenKeyboard_DrawDRC(void) { void OnscreenKeyboard_SetText(const cc_string* text) { } -void OnscreenKeyboard_Draw2D(Rect2D* r, struct Bitmap* bmp) { } void OnscreenKeyboard_Draw3D(void) { } void OnscreenKeyboard_Close(void) { diff --git a/src/Window_Win.c b/src/Window_Win.c index 6b0e13ef3..b4414e085 100644 --- a/src/Window_Win.c +++ b/src/Window_Win.c @@ -754,7 +754,6 @@ static void InitRawMouse(void) { void OnscreenKeyboard_Open(struct OpenKeyboardArgs* args) { } void OnscreenKeyboard_SetText(const cc_string* text) { } -void OnscreenKeyboard_Draw2D(Rect2D* r, struct Bitmap* bmp) { } void OnscreenKeyboard_Draw3D(void) { } void OnscreenKeyboard_Close(void) { } diff --git a/src/Window_Xbox.c b/src/Window_Xbox.c index 3f0e6edb4..0e23db23f 100644 --- a/src/Window_Xbox.c +++ b/src/Window_Xbox.c @@ -231,10 +231,6 @@ void OnscreenKeyboard_SetText(const cc_string* text) { VirtualKeyboard_SetText(text); } -void OnscreenKeyboard_Draw2D(Rect2D* r, struct Bitmap* bmp) { - VirtualKeyboard_Display2D(r, bmp); -} - void OnscreenKeyboard_Draw3D(void) { VirtualKeyboard_Display3D(); } diff --git a/src/Window_Xbox360.c b/src/Window_Xbox360.c index 5c1dec7a8..c7a137ef9 100644 --- a/src/Window_Xbox360.c +++ b/src/Window_Xbox360.c @@ -193,10 +193,6 @@ void OnscreenKeyboard_SetText(const cc_string* text) { VirtualKeyboard_SetText(text); } -void OnscreenKeyboard_Draw2D(Rect2D* r, struct Bitmap* bmp) { - VirtualKeyboard_Display2D(r, bmp); -} - void OnscreenKeyboard_Draw3D(void) { VirtualKeyboard_Display3D(); } diff --git a/src/Window_cocoa.m b/src/Window_cocoa.m index c6bbff711..9d14a0ac3 100644 --- a/src/Window_cocoa.m +++ b/src/Window_cocoa.m @@ -761,7 +761,6 @@ void Window_FreeFramebuffer(struct Bitmap* bmp) { void OnscreenKeyboard_Open(struct OpenKeyboardArgs* args) { } void OnscreenKeyboard_SetText(const cc_string* text) { } -void OnscreenKeyboard_Draw2D(Rect2D* r, struct Bitmap* bmp) { } void OnscreenKeyboard_Draw3D(void) { } void OnscreenKeyboard_Close(void) { }