mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-11 16:45:48 -04:00
Move Display_ScaleX/Y to Window.h and ignore build results for other consoles too
This commit is contained in:
parent
cdbe0d77f1
commit
81b56f76ce
11
.gitignore
vendored
11
.gitignore
vendored
@ -20,12 +20,19 @@ android/app/.externalNativeBuild/
|
||||
android/local.properties
|
||||
*.iml
|
||||
|
||||
# 3DS build results
|
||||
# Console build results
|
||||
build-360/
|
||||
build-3ds/
|
||||
build-dc/
|
||||
build-gc/
|
||||
build-n64/
|
||||
build-ps2/
|
||||
build-ps3/
|
||||
build-vita/
|
||||
build-wii/
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
|
@ -64,9 +64,9 @@ CC_VAR extern struct _DisplayData {
|
||||
} DisplayInfo;
|
||||
|
||||
/* Scales the given X coordinate from 96 dpi to current display dpi. */
|
||||
int Display_ScaleX(int x);
|
||||
static CC_INLINE int Display_ScaleX(int x) { return (int)(x * DisplayInfo.ScaleX); }
|
||||
/* Scales the given Y coordinate from 96 dpi to current display dpi. */
|
||||
int Display_ScaleY(int y);
|
||||
static CC_INLINE int Display_ScaleY(int y) { return (int)(y * DisplayInfo.ScaleY); }
|
||||
|
||||
/* Data for the game/launcher window. */
|
||||
CC_VAR extern struct _WinData {
|
||||
|
@ -18,9 +18,6 @@ static Result irrst_result;
|
||||
|
||||
struct _DisplayData DisplayInfo;
|
||||
struct _WinData WindowInfo;
|
||||
// Render everything at half size due to the small resolution
|
||||
int Display_ScaleX(int x) { return x / 2; }
|
||||
int Display_ScaleY(int y) { return y / 2; }
|
||||
|
||||
|
||||
// Note from https://github.com/devkitPro/libctru/blob/master/libctru/include/3ds/gfx.h
|
||||
|
@ -15,9 +15,6 @@ static cc_bool launcherMode;
|
||||
|
||||
struct _DisplayData DisplayInfo;
|
||||
struct _WinData WindowInfo;
|
||||
// no DPI scaling on 3DS
|
||||
int Display_ScaleX(int x) { return x; }
|
||||
int Display_ScaleY(int y) { return y; }
|
||||
|
||||
void Window_Init(void) {
|
||||
DisplayInfo.Width = vid_mode->width;
|
||||
|
@ -23,9 +23,6 @@ static GXRModeObj* rmode;
|
||||
void* Window_XFB;
|
||||
struct _DisplayData DisplayInfo;
|
||||
struct _WinData WindowInfo;
|
||||
// no DPI scaling on Wii/GameCube
|
||||
int Display_ScaleX(int x) { return x; }
|
||||
int Display_ScaleY(int y) { return y; }
|
||||
|
||||
|
||||
static void OnPowerOff(void) {
|
||||
|
@ -16,9 +16,6 @@ static cc_bool launcherMode;
|
||||
|
||||
struct _DisplayData DisplayInfo;
|
||||
struct _WinData WindowInfo;
|
||||
// no DPI scaling on Wii/GameCube
|
||||
int Display_ScaleX(int x) { return x; }
|
||||
int Display_ScaleY(int y) { return y; }
|
||||
|
||||
void Window_Init(void) {
|
||||
display_init(RESOLUTION_320x240, DEPTH_32_BPP, 2, GAMMA_NONE, FILTERS_DISABLED);
|
||||
|
@ -26,9 +26,6 @@ static char padBuf[256] __attribute__((aligned(64)));
|
||||
|
||||
struct _DisplayData DisplayInfo;
|
||||
struct _WinData WindowInfo;
|
||||
// no DPI scaling on PS Vita
|
||||
int Display_ScaleX(int x) { return x; }
|
||||
int Display_ScaleY(int y) { return y; }
|
||||
|
||||
void Window_Init(void) {
|
||||
DisplayInfo.Width = 640;
|
||||
|
@ -25,9 +25,6 @@ static KbConfig kb_config;
|
||||
|
||||
struct _DisplayData DisplayInfo;
|
||||
struct _WinData WindowInfo;
|
||||
// no DPI scaling on PS Vita
|
||||
int Display_ScaleX(int x) { return x; }
|
||||
int Display_ScaleY(int y) { return y; }
|
||||
|
||||
static void sysutil_callback(u64 status, u64 param, void* usrdata) {
|
||||
switch (status) {
|
||||
|
@ -21,9 +21,6 @@ static cc_bool launcherMode;
|
||||
|
||||
struct _DisplayData DisplayInfo;
|
||||
struct _WinData WindowInfo;
|
||||
// no DPI scaling on Wii/GameCube
|
||||
int Display_ScaleX(int x) { return x; }
|
||||
int Display_ScaleY(int y) { return y; }
|
||||
|
||||
void Window_Init(void) {
|
||||
DisplayInfo.Width = SCREEN_WIDTH;
|
||||
|
@ -18,9 +18,6 @@ static SceTouchPanelInfo frontPanel;
|
||||
|
||||
struct _DisplayData DisplayInfo;
|
||||
struct _WinData WindowInfo;
|
||||
// no DPI scaling on PS Vita
|
||||
int Display_ScaleX(int x) { return x; }
|
||||
int Display_ScaleY(int y) { return y; }
|
||||
|
||||
#define DISPLAY_WIDTH 960
|
||||
#define DISPLAY_HEIGHT 544
|
||||
|
@ -20,9 +20,6 @@ static xid_gamepad_in gp_state;
|
||||
|
||||
struct _DisplayData DisplayInfo;
|
||||
struct _WinData WindowInfo;
|
||||
// no DPI scaling on Xbox
|
||||
int Display_ScaleX(int x) { return x; }
|
||||
int Display_ScaleY(int y) { return y; }
|
||||
|
||||
// TODO No idea if this even works
|
||||
static void OnDataReceived(UTR_T* utr) {
|
||||
|
@ -18,9 +18,6 @@ static cc_bool launcherMode;
|
||||
|
||||
struct _DisplayData DisplayInfo;
|
||||
struct _WinData WindowInfo;
|
||||
// no DPI scaling on Xbox
|
||||
int Display_ScaleX(int x) { return x; }
|
||||
int Display_ScaleY(int y) { return y; }
|
||||
|
||||
// https://github.com/Free60Project/libxenon/blob/71a411cddfc26c9ccade08d054d87180c359797a/libxenon/drivers/console/console.c#L47
|
||||
struct ati_info {
|
||||
|
@ -10,9 +10,6 @@ struct _WinData WindowInfo;
|
||||
#define Display_CentreX(width) (DisplayInfo.x + (DisplayInfo.Width - width) / 2)
|
||||
#define Display_CentreY(height) (DisplayInfo.y + (DisplayInfo.Height - height) / 2)
|
||||
|
||||
int Display_ScaleX(int x) { return (int)(x * DisplayInfo.ScaleX); }
|
||||
int Display_ScaleY(int y) { return (int)(y * DisplayInfo.ScaleY); }
|
||||
|
||||
static int cursorPrevX, cursorPrevY;
|
||||
static cc_bool cursorVisible = true;
|
||||
/* Gets the position of the cursor in screen or window coordinates */
|
||||
|
Loading…
x
Reference in New Issue
Block a user