mirror of https://github.com/ClassiCube/ClassiCube
Make content offset x/y configurable and increase default one for xbox
This commit is contained in:
parent
68d6711d84
commit
0f95e40c83
|
|
@ -9,6 +9,7 @@
|
|||
#include "../Errors.h"
|
||||
#include "../ExtMath.h"
|
||||
#include "../Logger.h"
|
||||
#include "../Options.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
|
@ -40,8 +41,8 @@ void Window_Init(void) {
|
|||
Window_Main.UIScaleX = DEFAULT_UI_SCALE_X;
|
||||
Window_Main.UIScaleY = DEFAULT_UI_SCALE_Y;
|
||||
|
||||
DisplayInfo.ContentOffsetX = 10;
|
||||
DisplayInfo.ContentOffsetY = 10;
|
||||
DisplayInfo.ContentOffsetX = Option_GetOffsetX(10);
|
||||
DisplayInfo.ContentOffsetY = Option_GetOffsetY(10);
|
||||
DisplayInfo.FullRedraw = true;
|
||||
|
||||
Hw32xInit(MARS_VDP_MODE_32K, 0);
|
||||
|
|
|
|||
|
|
@ -87,6 +87,9 @@ Copyright 2014-2025 ClassiCube | Licensed under BSD-3
|
|||
#define OPT_INV_SCROLLBAR_SCALE "inv-scrollbar-scale"
|
||||
#define OPT_ANAGLYPH3D "anaglyph-3d"
|
||||
|
||||
#define Option_GetOffsetX(defValue) Options_GetInt("offset-x", 0, 1000, defValue);
|
||||
#define Option_GetOffsetY(defValue) Options_GetInt("offset-y", 0, 1000, defValue);
|
||||
|
||||
#define OPT_SELECTED_BLOCK_OUTLINE_COLOR "selected-block-outline-color"
|
||||
#define OPT_SELECTED_BLOCK_OUTLINE_OPACITY "selected-block-outline-opacity"
|
||||
#define OPT_SELECTED_BLOCK_OUTLINE_SCALE "selected-block-outline-scale"
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
#include "Errors.h"
|
||||
#include "ExtMath.h"
|
||||
#include "VirtualKeyboard.h"
|
||||
#include "Options.h"
|
||||
#include <libdragon.h>
|
||||
|
||||
static cc_bool launcherMode;
|
||||
|
|
@ -40,8 +41,8 @@ void Window_Init(void) {
|
|||
Window_Main.UIScaleX = DEFAULT_UI_SCALE_X;
|
||||
Window_Main.UIScaleY = DEFAULT_UI_SCALE_Y;
|
||||
|
||||
DisplayInfo.ContentOffsetX = 10;
|
||||
DisplayInfo.ContentOffsetY = 10;
|
||||
DisplayInfo.ContentOffsetX = Option_GetOffsetX(10);
|
||||
DisplayInfo.ContentOffsetY = Option_GetOffsetY(10);
|
||||
Window_Main.SoftKeyboard = SOFT_KEYBOARD_VIRTUAL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
#include "../Bitmap.h"
|
||||
#include "../Errors.h"
|
||||
#include "../ExtMath.h"
|
||||
#include "../Options.h"
|
||||
#include "../VirtualKeyboard.h"
|
||||
#include <kos.h>
|
||||
|
||||
|
|
@ -37,8 +38,8 @@ void Window_Init(void) {
|
|||
Window_Main.UIScaleX = DEFAULT_UI_SCALE_X;
|
||||
Window_Main.UIScaleY = DEFAULT_UI_SCALE_Y;
|
||||
|
||||
DisplayInfo.ContentOffsetX = 10;
|
||||
DisplayInfo.ContentOffsetY = 20;
|
||||
DisplayInfo.ContentOffsetX = Option_GetOffsetX(10);
|
||||
DisplayInfo.ContentOffsetY = Option_GetOffsetY(20);
|
||||
Window_Main.SoftKeyboard = SOFT_KEYBOARD_VIRTUAL;
|
||||
|
||||
window_inited = true;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include "../Errors.h"
|
||||
#include "../ExtMath.h"
|
||||
#include "../Graphics.h"
|
||||
#include "../Options.h"
|
||||
#include "../VirtualKeyboard.h"
|
||||
|
||||
#include <gccore.h>
|
||||
|
|
@ -78,8 +79,8 @@ void Window_Init(void) {
|
|||
Window_Main.UIScaleX = DEFAULT_UI_SCALE_X;
|
||||
Window_Main.UIScaleY = DEFAULT_UI_SCALE_Y;
|
||||
|
||||
DisplayInfo.ContentOffsetX = 10;
|
||||
DisplayInfo.ContentOffsetY = 10;
|
||||
DisplayInfo.ContentOffsetX = Option_GetOffsetX(10);
|
||||
DisplayInfo.ContentOffsetY = Option_GetOffsetY(10);
|
||||
Window_Main.SoftKeyboard = SOFT_KEYBOARD_VIRTUAL;
|
||||
|
||||
#if defined HW_RVL
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include "../Errors.h"
|
||||
#include "../ExtMath.h"
|
||||
#include "../Logger.h"
|
||||
#include "../Options.h"
|
||||
#include "../VirtualKeyboard.h"
|
||||
|
||||
#include <psxapi.h>
|
||||
|
|
@ -43,8 +44,8 @@ void Window_Init(void) {
|
|||
Window_Main.UIScaleX = DEFAULT_UI_SCALE_X;
|
||||
Window_Main.UIScaleY = DEFAULT_UI_SCALE_Y;
|
||||
|
||||
DisplayInfo.ContentOffsetX = 10;
|
||||
DisplayInfo.ContentOffsetY = 10;
|
||||
DisplayInfo.ContentOffsetX = Option_GetOffsetX(10);
|
||||
DisplayInfo.ContentOffsetY = Option_GetOffsetY(10);
|
||||
Window_Main.SoftKeyboard = SOFT_KEYBOARD_VIRTUAL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include "../Errors.h"
|
||||
#include "../ExtMath.h"
|
||||
#include "../Logger.h"
|
||||
#include "../Options.h"
|
||||
#include "../VirtualKeyboard.h"
|
||||
|
||||
#include <libpad.h>
|
||||
|
|
@ -53,8 +54,8 @@ void Window_Init(void) {
|
|||
Window_Main.UIScaleX = DEFAULT_UI_SCALE_X;
|
||||
Window_Main.UIScaleY = 1.0f / Window_Main.Height;
|
||||
|
||||
DisplayInfo.ContentOffsetX = 10;
|
||||
DisplayInfo.ContentOffsetY = 10;
|
||||
DisplayInfo.ContentOffsetX = Option_GetOffsetX(10);
|
||||
DisplayInfo.ContentOffsetY = Option_GetOffsetX(10);
|
||||
Window_Main.SoftKeyboard = SOFT_KEYBOARD_VIRTUAL;
|
||||
|
||||
if (PS2MouseInit() >= 0) {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include "../Errors.h"
|
||||
#include "../ExtMath.h"
|
||||
#include "../Logger.h"
|
||||
#include "../Options.h"
|
||||
#include "../VirtualKeyboard.h"
|
||||
|
||||
#include <io/pad.h>
|
||||
|
|
@ -57,8 +58,8 @@ void Window_Init(void) {
|
|||
Window_Main.UIScaleX = DEFAULT_UI_SCALE_X;
|
||||
Window_Main.UIScaleY = DEFAULT_UI_SCALE_Y;
|
||||
|
||||
DisplayInfo.ContentOffsetX = 20;
|
||||
DisplayInfo.ContentOffsetY = 20;
|
||||
DisplayInfo.ContentOffsetX = Option_GetOffsetX(20);
|
||||
DisplayInfo.ContentOffsetY = Option_GetOffsetY(20);
|
||||
Window_Main.SoftKeyboard = SOFT_KEYBOARD_VIRTUAL;
|
||||
|
||||
ioKbInit(MAX_KB_PORT_NUM);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include "../Errors.h"
|
||||
#include "../ExtMath.h"
|
||||
#include "../Logger.h"
|
||||
#include "../Options.h"
|
||||
#include "../VirtualKeyboard.h"
|
||||
#include <VideoOut.h>
|
||||
|
||||
|
|
@ -39,8 +40,8 @@ void Window_Init(void) {
|
|||
Window_Main.UIScaleX = DEFAULT_UI_SCALE_X;
|
||||
Window_Main.UIScaleY = DEFAULT_UI_SCALE_Y;
|
||||
|
||||
DisplayInfo.ContentOffsetX = 20;
|
||||
DisplayInfo.ContentOffsetY = 20;
|
||||
DisplayInfo.ContentOffsetX = Option_GetOffsetX(20);
|
||||
DisplayInfo.ContentOffsetY = Option_GetOffsetY(20);
|
||||
Window_Main.SoftKeyboard = SOFT_KEYBOARD_VIRTUAL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
#include "../Bitmap.h"
|
||||
#include "../Errors.h"
|
||||
#include "../ExtMath.h"
|
||||
#include "../Options.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
|
@ -41,8 +42,8 @@ void Window_Init(void) {
|
|||
Window_Main.UIScaleX = DEFAULT_UI_SCALE_X;
|
||||
Window_Main.UIScaleY = DEFAULT_UI_SCALE_Y;
|
||||
|
||||
DisplayInfo.ContentOffsetX = 10;
|
||||
DisplayInfo.ContentOffsetY = 10;
|
||||
DisplayInfo.ContentOffsetX = Option_GetOffsetX(10);
|
||||
DisplayInfo.ContentOffsetY = Option_GetOffsetY(10);
|
||||
|
||||
vdp2_tvmd_display_res_set(VDP2_TVMD_INTERLACE_NONE, VDP2_TVMD_HORZ_NORMAL_A, VDP2_TVMD_VERT_224);
|
||||
vdp2_scrn_back_color_set(VDP2_VRAM_ADDR(0, 0), RGB1555(1, 19, 0, 0));
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include "../Graphics.h"
|
||||
#include "../Launcher.h"
|
||||
#include "../LBackend.h"
|
||||
#include "../Options.h"
|
||||
#include "../VirtualKeyboard.h"
|
||||
|
||||
#include <coreinit/memheap.h>
|
||||
|
|
@ -85,8 +86,8 @@ void Window_Init(void) {
|
|||
Window_Main.UIScaleX = DEFAULT_UI_SCALE_X;
|
||||
Window_Main.UIScaleY = DEFAULT_UI_SCALE_Y;
|
||||
|
||||
DisplayInfo.ContentOffsetX = 10;
|
||||
DisplayInfo.ContentOffsetY = 10;
|
||||
DisplayInfo.ContentOffsetX = Option_GetOffsetX(10);
|
||||
DisplayInfo.ContentOffsetY = Option_GetOffsetY(10);
|
||||
|
||||
Window_Main.SoftKeyboard = SOFT_KEYBOARD_VIRTUAL;
|
||||
Input_SetTouchMode(true);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
#include "../Bitmap.h"
|
||||
#include "../Errors.h"
|
||||
#include "../ExtMath.h"
|
||||
#include "../Options.h"
|
||||
#include "../VirtualKeyboard.h"
|
||||
|
||||
#include <hal/video.h>
|
||||
|
|
@ -41,8 +42,8 @@ void Window_Init(void) {
|
|||
Window_Main.UIScaleX = DEFAULT_UI_SCALE_X;
|
||||
Window_Main.UIScaleY = DEFAULT_UI_SCALE_Y;
|
||||
|
||||
DisplayInfo.ContentOffsetX = 10;
|
||||
DisplayInfo.ContentOffsetY = 10;
|
||||
DisplayInfo.ContentOffsetX = Option_GetOffsetX(20);
|
||||
DisplayInfo.ContentOffsetY = Option_GetOffsetY(20);
|
||||
Window_Main.SoftKeyboard = SOFT_KEYBOARD_VIRTUAL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue