mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-20 06:01:16 +00:00
Rework to add Exclusive Fullscreen option.
This commit is contained in:
parent
b5b2c4d784
commit
45e2a1657c
@ -58,6 +58,7 @@ CMainDialog::CMainDialog(QWidget* pParent) : QDialog(pParent)
|
|||||||
connect(m_ui->musicCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckboxMusic);
|
connect(m_ui->musicCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckboxMusic);
|
||||||
connect(m_ui->sound3DCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckbox3DSound);
|
connect(m_ui->sound3DCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckbox3DSound);
|
||||||
connect(m_ui->fullscreenCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckboxFullscreen);
|
connect(m_ui->fullscreenCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckboxFullscreen);
|
||||||
|
connect(m_ui->exclusiveFullscreenCheckbox, &QCheckBox::toggled, this, &CMainDialog::OnCheckboxExclusiveFullscreen);
|
||||||
connect(m_ui->rumbleCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckboxRumble);
|
connect(m_ui->rumbleCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckboxRumble);
|
||||||
connect(m_ui->textureCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckboxTexture);
|
connect(m_ui->textureCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckboxTexture);
|
||||||
connect(m_ui->touchComboBox, &QComboBox::currentIndexChanged, this, &CMainDialog::TouchControlsChanged);
|
connect(m_ui->touchComboBox, &QComboBox::currentIndexChanged, this, &CMainDialog::TouchControlsChanged);
|
||||||
@ -259,6 +260,8 @@ void CMainDialog::UpdateInterface()
|
|||||||
}
|
}
|
||||||
m_ui->musicCheckBox->setChecked(currentConfigApp->m_music);
|
m_ui->musicCheckBox->setChecked(currentConfigApp->m_music);
|
||||||
m_ui->fullscreenCheckBox->setChecked(currentConfigApp->m_full_screen);
|
m_ui->fullscreenCheckBox->setChecked(currentConfigApp->m_full_screen);
|
||||||
|
m_ui->exclusiveFullscreenCheckbox->setEnabled(currentConfigApp->m_full_screen);
|
||||||
|
m_ui->exclusiveFullscreenCheckbox->setChecked(currentConfigApp->m_exclusive_full_screen);
|
||||||
m_ui->rumbleCheckBox->setChecked(currentConfigApp->m_haptic);
|
m_ui->rumbleCheckBox->setChecked(currentConfigApp->m_haptic);
|
||||||
m_ui->touchComboBox->setCurrentIndex(currentConfigApp->m_touch_scheme);
|
m_ui->touchComboBox->setCurrentIndex(currentConfigApp->m_touch_scheme);
|
||||||
m_ui->transitionTypeComboBox->setCurrentIndex(currentConfigApp->m_transition_type);
|
m_ui->transitionTypeComboBox->setCurrentIndex(currentConfigApp->m_transition_type);
|
||||||
@ -344,6 +347,14 @@ void CMainDialog::OnCheckboxMusic(bool checked)
|
|||||||
void CMainDialog::OnCheckboxFullscreen(bool checked)
|
void CMainDialog::OnCheckboxFullscreen(bool checked)
|
||||||
{
|
{
|
||||||
currentConfigApp->m_full_screen = checked;
|
currentConfigApp->m_full_screen = checked;
|
||||||
|
m_ui->exclusiveFullscreenCheckbox->setEnabled(checked);
|
||||||
|
m_modified = true;
|
||||||
|
UpdateInterface();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMainDialog::OnCheckboxExclusiveFullscreen(bool checked)
|
||||||
|
{
|
||||||
|
currentConfigApp->m_exclusive_full_screen = checked;
|
||||||
m_modified = true;
|
m_modified = true;
|
||||||
UpdateInterface();
|
UpdateInterface();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,6 +42,7 @@ private slots:
|
|||||||
void OnRadiobuttonTextureHighQuality(bool checked);
|
void OnRadiobuttonTextureHighQuality(bool checked);
|
||||||
void OnCheckboxMusic(bool checked);
|
void OnCheckboxMusic(bool checked);
|
||||||
void OnCheckboxFullscreen(bool checked);
|
void OnCheckboxFullscreen(bool checked);
|
||||||
|
void OnCheckboxExclusiveFullscreen(bool checked);
|
||||||
void OnCheckboxRumble(bool checked);
|
void OnCheckboxRumble(bool checked);
|
||||||
void OnCheckboxTexture(bool checked);
|
void OnCheckboxTexture(bool checked);
|
||||||
void TouchControlsChanged(int index);
|
void TouchControlsChanged(int index);
|
||||||
|
|||||||
@ -74,6 +74,7 @@ bool CConfigApp::InitInstance()
|
|||||||
m_driver = NULL;
|
m_driver = NULL;
|
||||||
m_device = NULL;
|
m_device = NULL;
|
||||||
m_full_screen = TRUE;
|
m_full_screen = TRUE;
|
||||||
|
m_exclusive_full_screen = FALSE;
|
||||||
m_transition_type = 3; // 3: Mosaic
|
m_transition_type = 3; // 3: Mosaic
|
||||||
m_wide_view_angle = TRUE;
|
m_wide_view_angle = TRUE;
|
||||||
m_use_joystick = TRUE;
|
m_use_joystick = TRUE;
|
||||||
@ -165,6 +166,7 @@ bool CConfigApp::ReadRegisterSettings()
|
|||||||
m_display_bit_depth = iniparser_getint(dict, "isle:Display Bit Depth", -1);
|
m_display_bit_depth = iniparser_getint(dict, "isle:Display Bit Depth", -1);
|
||||||
m_flip_surfaces = iniparser_getboolean(dict, "isle:Flip Surfaces", m_flip_surfaces);
|
m_flip_surfaces = iniparser_getboolean(dict, "isle:Flip Surfaces", m_flip_surfaces);
|
||||||
m_full_screen = iniparser_getboolean(dict, "isle:Full Screen", m_full_screen);
|
m_full_screen = iniparser_getboolean(dict, "isle:Full Screen", m_full_screen);
|
||||||
|
m_exclusive_full_screen = iniparser_getboolean(dict, "isle:Exclusive Full Screen", m_exclusive_full_screen);
|
||||||
m_transition_type = iniparser_getint(dict, "isle:Transition Type", m_transition_type);
|
m_transition_type = iniparser_getint(dict, "isle:Transition Type", m_transition_type);
|
||||||
m_touch_scheme = iniparser_getint(dict, "isle:Touch Scheme", m_touch_scheme);
|
m_touch_scheme = iniparser_getint(dict, "isle:Touch Scheme", m_touch_scheme);
|
||||||
m_3d_video_ram = iniparser_getboolean(dict, "isle:Back Buffers in Video RAM", m_3d_video_ram);
|
m_3d_video_ram = iniparser_getboolean(dict, "isle:Back Buffers in Video RAM", m_3d_video_ram);
|
||||||
@ -337,6 +339,7 @@ void CConfigApp::WriteRegisterSettings() const
|
|||||||
SetIniInt(dict, "isle:Display Bit Depth", m_display_bit_depth);
|
SetIniInt(dict, "isle:Display Bit Depth", m_display_bit_depth);
|
||||||
SetIniBool(dict, "isle:Flip Surfaces", m_flip_surfaces);
|
SetIniBool(dict, "isle:Flip Surfaces", m_flip_surfaces);
|
||||||
SetIniBool(dict, "isle:Full Screen", m_full_screen);
|
SetIniBool(dict, "isle:Full Screen", m_full_screen);
|
||||||
|
SetIniBool(dict, "isle:Exclusive Full Screen", m_exclusive_full_screen);
|
||||||
SetIniBool(dict, "isle:Wide View Angle", m_wide_view_angle);
|
SetIniBool(dict, "isle:Wide View Angle", m_wide_view_angle);
|
||||||
|
|
||||||
SetIniInt(dict, "isle:Transition Type", m_transition_type);
|
SetIniInt(dict, "isle:Transition Type", m_transition_type);
|
||||||
|
|||||||
@ -69,6 +69,7 @@ class CConfigApp {
|
|||||||
int m_display_bit_depth;
|
int m_display_bit_depth;
|
||||||
bool m_flip_surfaces;
|
bool m_flip_surfaces;
|
||||||
bool m_full_screen;
|
bool m_full_screen;
|
||||||
|
bool m_exclusive_full_screen;
|
||||||
int m_transition_type;
|
int m_transition_type;
|
||||||
bool m_3d_video_ram;
|
bool m_3d_video_ram;
|
||||||
bool m_wide_view_angle;
|
bool m_wide_view_angle;
|
||||||
|
|||||||
@ -605,6 +605,9 @@ The game will gradually increase the number of actors until this maximum is reac
|
|||||||
<layout class="QGridLayout" name="gridLayout_3">
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QSpinBox" name="framerateSpinBox">
|
<widget class="QSpinBox" name="framerateSpinBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>Maximum framerate. Values above 100fps are untested.</p></body></html></string>
|
||||||
|
</property>
|
||||||
<property name="suffix">
|
<property name="suffix">
|
||||||
<string>fps</string>
|
<string>fps</string>
|
||||||
</property>
|
</property>
|
||||||
@ -620,14 +623,31 @@ The game will gradually increase the number of actors until this maximum is reac
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QCheckBox" name="fullscreenCheckBox">
|
<layout class="QVBoxLayout" name="fullscreenCheckboxContainer">
|
||||||
<property name="toolTip">
|
<item>
|
||||||
<string>Toggle fullscreen display mode.</string>
|
<widget class="QCheckBox" name="fullscreenCheckBox">
|
||||||
</property>
|
<property name="toolTip">
|
||||||
<property name="text">
|
<string>Toggle fullscreen display mode.</string>
|
||||||
<string>Fullscreen</string>
|
</property>
|
||||||
</property>
|
<property name="text">
|
||||||
</widget>
|
<string>Fullscreen</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="exclusiveFullscreenCheckbox">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Grants the app full control of the display for better performance and lower input lag. May cause slower alt-tabbing.</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Exclusive Fullscreen</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
@ -640,6 +660,9 @@ The game will gradually increase the number of actors until this maximum is reac
|
|||||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="aspectRatioComboBox">
|
<widget class="QComboBox" name="aspectRatioComboBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>The aspect ratio you intend to use.<br/>Select <span style=" font-weight:700;">Custom</span> to define your own width and height.<br/>Has no effect on the game itself.</p></body></html></string>
|
||||||
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
@ -675,6 +698,9 @@ The game will gradually increase the number of actors until this maximum is reac
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>Horizontal resolution. </p><p>Locked to aspect ratio, unless <span style=" font-weight:700;">Custom</span> is select as the aspect ratio.</p></body></html></string>
|
||||||
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||||
</property>
|
</property>
|
||||||
@ -719,6 +745,9 @@ The game will gradually increase the number of actors until this maximum is reac
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>Vertical resolution. </p><p>If an aspect ratio other than <span style=" font-weight:700;">Custom</span> is selected, this directly affects the horizontal resolution.</p></body></html></string>
|
||||||
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||||
</property>
|
</property>
|
||||||
@ -827,6 +856,9 @@ The game will gradually increase the number of actors until this maximum is reac
|
|||||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="textureLoader">
|
<widget class="QGroupBox" name="textureLoader">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Settings for Texture Loader extension.</string>
|
||||||
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Texture Loader Extension</string>
|
<string>Texture Loader Extension</string>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@ -179,6 +179,7 @@ IsleApp::IsleApp()
|
|||||||
m_xRes = 640;
|
m_xRes = 640;
|
||||||
m_yRes = 480;
|
m_yRes = 480;
|
||||||
m_frameRate = 100.0f;
|
m_frameRate = 100.0f;
|
||||||
|
m_exclusiveFullScreen = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: ISLE 0x4011a0
|
// FUNCTION: ISLE 0x4011a0
|
||||||
@ -841,7 +842,7 @@ MxResult IsleApp::SetupWindow()
|
|||||||
|
|
||||||
window = SDL_CreateWindowWithProperties(props);
|
window = SDL_CreateWindowWithProperties(props);
|
||||||
|
|
||||||
if (m_fullScreen) {
|
if (m_exclusiveFullScreen && m_fullScreen) {
|
||||||
SDL_DisplayMode closestMode;
|
SDL_DisplayMode closestMode;
|
||||||
SDL_DisplayID displayID = SDL_GetDisplayForWindow(window);
|
SDL_DisplayID displayID = SDL_GetDisplayForWindow(window);
|
||||||
bool findModeSuccess =
|
bool findModeSuccess =
|
||||||
@ -1007,6 +1008,7 @@ bool IsleApp::LoadConfig()
|
|||||||
|
|
||||||
iniparser_set(dict, "isle:Flip Surfaces", m_flipSurfaces ? "true" : "false");
|
iniparser_set(dict, "isle:Flip Surfaces", m_flipSurfaces ? "true" : "false");
|
||||||
iniparser_set(dict, "isle:Full Screen", m_fullScreen ? "true" : "false");
|
iniparser_set(dict, "isle:Full Screen", m_fullScreen ? "true" : "false");
|
||||||
|
iniparser_set(dict, "isle:Exclusive Full Screen", m_exclusiveFullScreen ? "true" : "false");
|
||||||
iniparser_set(dict, "isle:Wide View Angle", m_wideViewAngle ? "true" : "false");
|
iniparser_set(dict, "isle:Wide View Angle", m_wideViewAngle ? "true" : "false");
|
||||||
|
|
||||||
iniparser_set(dict, "isle:3DSound", m_use3dSound ? "true" : "false");
|
iniparser_set(dict, "isle:3DSound", m_use3dSound ? "true" : "false");
|
||||||
@ -1072,6 +1074,7 @@ bool IsleApp::LoadConfig()
|
|||||||
|
|
||||||
m_flipSurfaces = iniparser_getboolean(dict, "isle:Flip Surfaces", m_flipSurfaces);
|
m_flipSurfaces = iniparser_getboolean(dict, "isle:Flip Surfaces", m_flipSurfaces);
|
||||||
m_fullScreen = iniparser_getboolean(dict, "isle:Full Screen", m_fullScreen);
|
m_fullScreen = iniparser_getboolean(dict, "isle:Full Screen", m_fullScreen);
|
||||||
|
m_exclusiveFullScreen = iniparser_getboolean(dict, "isle:Exclusive Full Screen", m_exclusiveFullScreen);
|
||||||
m_wideViewAngle = iniparser_getboolean(dict, "isle:Wide View Angle", m_wideViewAngle);
|
m_wideViewAngle = iniparser_getboolean(dict, "isle:Wide View Angle", m_wideViewAngle);
|
||||||
m_use3dSound = iniparser_getboolean(dict, "isle:3DSound", m_use3dSound);
|
m_use3dSound = iniparser_getboolean(dict, "isle:3DSound", m_use3dSound);
|
||||||
m_useMusic = iniparser_getboolean(dict, "isle:Music", m_useMusic);
|
m_useMusic = iniparser_getboolean(dict, "isle:Music", m_useMusic);
|
||||||
|
|||||||
@ -72,7 +72,7 @@ class IsleApp {
|
|||||||
char* m_cdPath; // 0x04
|
char* m_cdPath; // 0x04
|
||||||
char* m_deviceId; // 0x08
|
char* m_deviceId; // 0x08
|
||||||
char* m_savePath; // 0x0c
|
char* m_savePath; // 0x0c
|
||||||
MxS32 m_fullScreen; // 0x10
|
MxBool m_fullScreen; // 0x10
|
||||||
MxS32 m_flipSurfaces; // 0x14
|
MxS32 m_flipSurfaces; // 0x14
|
||||||
MxS32 m_backBuffersInVram; // 0x18
|
MxS32 m_backBuffersInVram; // 0x18
|
||||||
MxS32 m_using8bit; // 0x1c
|
MxS32 m_using8bit; // 0x1c
|
||||||
@ -111,6 +111,7 @@ class IsleApp {
|
|||||||
MxS32 m_xRes;
|
MxS32 m_xRes;
|
||||||
MxS32 m_yRes;
|
MxS32 m_yRes;
|
||||||
MxFloat m_frameRate;
|
MxFloat m_frameRate;
|
||||||
|
MxBool m_exclusiveFullScreen;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern IsleApp* g_isle;
|
extern IsleApp* g_isle;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user