Allow plugins to set scissor region and viewport region

This commit is contained in:
UnknownShadow200 2024-07-30 21:39:30 +10:00
parent 96840b1a03
commit 67523f6228
3 changed files with 4 additions and 5 deletions

View File

@ -64,7 +64,6 @@ cc_bool Game_Anaglyph3D;
cc_bool Game_ViewBobbing, Game_HideGui;
cc_bool Game_BreakableLiquids, Game_ScreenshotRequested;
struct GameVersion Game_Version;
Game_Draw2DHook Game_Draw2DHooks[4];
static char usernameBuffer[STRING_SIZE];
static char mppassBuffer[STRING_SIZE];

View File

@ -269,8 +269,8 @@ void Gfx_GetApiInfo(cc_string* info);
/* Updates state when the window's dimensions have changed */
/* NOTE: This may require recreating the context depending on the backend */
void Gfx_OnWindowResize(void);
void Gfx_SetViewport(int x, int y, int w, int h);
void Gfx_SetScissor (int x, int y, int w, int h);
CC_API void Gfx_SetViewport(int x, int y, int w, int h);
CC_API void Gfx_SetScissor (int x, int y, int w, int h);
enum Screen3DS { TOP_SCREEN, BOTTOM_SCREEN };
#ifdef CC_BUILD_DUALSCREEN

View File

@ -365,7 +365,7 @@ static void VirtualKeyboard_MakeTexture(void) {
}
/* TODO hook into context lost etc */
static void VirtualKeyboard_Display3D(void) {
static void VirtualKeyboard_Display3D(float delta) {
if (!DisplayInfo.ShowingSoftKeyboard) return;
if (!kb_vb) {
@ -427,7 +427,7 @@ static void VirtualKeyboard_Open(struct OpenKeyboardArgs* args, cc_bool launcher
Window_Main.SoftKeyboardFocus = true;
Input.DownHook = VirtualKeyboard_ProcessDown;
LBackend_Hooks[0] = VirtualKeyboard_Display2D;
Game_Draw2DHooks[0] = VirtualKeyboard_Display3D;
Game.Draw2DHooks[0] = VirtualKeyboard_Display3D;
}
static void VirtualKeyboard_SetText(const cc_string* text) {