mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2024-11-14 21:37:42 -07:00
attempt at auto-emphasis mode, emphasizing main screen
This commit is contained in:
parent
85d823d4c7
commit
0a04efc33e
@ -92,6 +92,8 @@ extern u32 IE[2];
|
||||
extern u32 IF[2];
|
||||
extern Timer Timers[8];
|
||||
|
||||
extern u16 PowerControl9;
|
||||
|
||||
extern u16 ExMemCnt[2];
|
||||
extern u8 ROMSeed0[2*8];
|
||||
extern u8 ROMSeed1[2*8];
|
||||
|
@ -64,6 +64,9 @@ int ScreenGap = 0;
|
||||
int ScreenLayout = 0;
|
||||
int ScreenSizing = 0;
|
||||
|
||||
int MainScreenPos[3];
|
||||
int AutoScreenSizing;
|
||||
|
||||
uiRect TopScreenRect;
|
||||
uiRect BottomScreenRect;
|
||||
|
||||
@ -73,6 +76,9 @@ u32 KeyInputMask;
|
||||
SDL_Joystick* Joystick;
|
||||
|
||||
|
||||
void SetupScreenRects(int width, int height);
|
||||
|
||||
|
||||
|
||||
void UpdateWindowTitle(void* data)
|
||||
{
|
||||
@ -88,6 +94,11 @@ int EmuThreadFunc(void* burp)
|
||||
{
|
||||
NDS::Init();
|
||||
|
||||
MainScreenPos[0] = 0;
|
||||
MainScreenPos[1] = 0;
|
||||
MainScreenPos[2] = 0;
|
||||
AutoScreenSizing = 0;
|
||||
|
||||
ScreenDrawInited = false;
|
||||
Touching = false;
|
||||
|
||||
@ -174,6 +185,35 @@ int EmuThreadFunc(void* burp)
|
||||
|
||||
if (EmuRunning == 0) break;
|
||||
|
||||
// auto screen layout
|
||||
{
|
||||
MainScreenPos[2] = MainScreenPos[1];
|
||||
MainScreenPos[1] = MainScreenPos[0];
|
||||
MainScreenPos[0] = NDS::PowerControl9 >> 15;
|
||||
|
||||
int guess;
|
||||
if (MainScreenPos[0] == MainScreenPos[2] &&
|
||||
MainScreenPos[0] != MainScreenPos[1])
|
||||
{
|
||||
// constant flickering, likely displaying 3D on both screens
|
||||
// TODO: when both screens are used for 2D only...???
|
||||
guess = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (MainScreenPos[0] == 1)
|
||||
guess = 1;
|
||||
else
|
||||
guess = 2;
|
||||
}
|
||||
|
||||
if (guess != AutoScreenSizing)
|
||||
{
|
||||
AutoScreenSizing = guess;
|
||||
SetupScreenRects(Config::WindowWidth, Config::WindowHeight);
|
||||
}
|
||||
}
|
||||
|
||||
memcpy(ScreenBuffer, GPU::Framebuffer, 256*384*4);
|
||||
uiAreaQueueRedrawAll(MainDrawArea);
|
||||
|
||||
@ -346,10 +386,7 @@ void SetupScreenRects(int width, int height)
|
||||
|
||||
int sizemode;
|
||||
if (ScreenSizing == 3)
|
||||
{
|
||||
// TODO!! auto mode
|
||||
sizemode = 0;
|
||||
}
|
||||
sizemode = AutoScreenSizing;
|
||||
else
|
||||
sizemode = ScreenSizing;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user