mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
Fix Draw Cursor option in Config tool
Allow the Draw Cursor checkbox to be changed regardless of video mode. Additionally, add a line to the CMake script so that, during the long wait for SDL3 to download, users don't think the process has frozen.
This commit is contained in:
parent
0cfcc0fb21
commit
4a3d5ec8ac
@ -50,6 +50,8 @@ message(STATUS "Internal miniwin: ${ISLE_MINIWIN}")
|
||||
message(STATUS "Isle debugging: ${ISLE_DEBUG}")
|
||||
message(STATUS "Compile shaders: ${ISLE_COMPILE_SHADERS}")
|
||||
|
||||
message(STATUS "Fetching SDL3, please wait...")
|
||||
|
||||
if (DOWNLOAD_DEPENDENCIES)
|
||||
# FetchContent downloads and configures dependencies
|
||||
include(FetchContent)
|
||||
|
||||
@ -121,6 +121,10 @@ void CMainDialog::OnList3DevicesSelectionChanged(int selected)
|
||||
{
|
||||
LegoDeviceEnumerate* device_enumerator = currentConfigApp->m_device_enumerator;
|
||||
device_enumerator->GetDevice(selected, currentConfigApp->m_driver, currentConfigApp->m_device);
|
||||
/* The code below originally forced the drawCursorCheckBox to be enabled (not necessarily checked) in any hardware mode.
|
||||
* Oddly enough, this same condition is also run in UpdateInterface(), so it ends up doing this check twice.
|
||||
* Additionally, some of the actions taken were weirdly split between them.
|
||||
* Disabling the Draw Cursor checkbox on software modes is no longer relevant, nor is forcing it on with hardware modes.
|
||||
if (currentConfigApp->GetHardwareDeviceColorModel() != D3DCOLOR_NONE) {
|
||||
m_ui->drawCursorCheckBox->setEnabled(true);
|
||||
}
|
||||
@ -130,6 +134,14 @@ void CMainDialog::OnList3DevicesSelectionChanged(int selected)
|
||||
m_ui->videomemoryCheckBox->setChecked(currentConfigApp->m_3d_video_ram);
|
||||
m_ui->flipVideoMemoryPagesCheckBox->setChecked(currentConfigApp->m_flip_surfaces);
|
||||
}
|
||||
*/
|
||||
if (currentConfigApp->GetHardwareDeviceColorModel() == D3DCOLOR_NONE) {
|
||||
currentConfigApp->m_3d_video_ram = FALSE;
|
||||
currentConfigApp->m_flip_surfaces = FALSE;
|
||||
m_ui->videomemoryCheckBox->setChecked(currentConfigApp->m_3d_video_ram);
|
||||
m_ui->flipVideoMemoryPagesCheckBox->setChecked(currentConfigApp->m_flip_surfaces);
|
||||
}
|
||||
// The above code was rewritten so that the Draw Cursor checkbox is always enabled, in any mode.
|
||||
m_modified = true;
|
||||
UpdateInterface();
|
||||
}
|
||||
@ -159,6 +171,9 @@ void CMainDialog::UpdateInterface()
|
||||
m_ui->videomemoryCheckBox->setChecked(currentConfigApp->m_3d_video_ram);
|
||||
bool full_screen = currentConfigApp->m_full_screen;
|
||||
currentConfigApp->AdjustDisplayBitDepthBasedOnRenderStatus();
|
||||
/* The code below is used to force the Draw Cursor checkbox on in any hardware mode, but still have it enabled.
|
||||
* Additionally, it disables it in software mode, and forces it to be off.
|
||||
* This is not relevant on modern platforms.
|
||||
if (currentConfigApp->GetHardwareDeviceColorModel() != D3DCOLOR_NONE) {
|
||||
m_ui->drawCursorCheckBox->setChecked(true);
|
||||
}
|
||||
@ -167,6 +182,7 @@ void CMainDialog::UpdateInterface()
|
||||
currentConfigApp->m_draw_cursor = FALSE;
|
||||
m_ui->drawCursorCheckBox->setEnabled(false);
|
||||
}
|
||||
*/
|
||||
if (full_screen) {
|
||||
if (currentConfigApp->m_display_bit_depth == 8) {
|
||||
m_ui->colorPalette256RadioButton->setChecked(true);
|
||||
|
||||
@ -175,10 +175,13 @@ bool CConfigApp::ValidateSettings()
|
||||
is_modified = TRUE;
|
||||
}
|
||||
}
|
||||
/* This code disables Draw Cursor whenever a software mode is selected.
|
||||
* This isn't relevant on modern platforms.
|
||||
if (GetHardwareDeviceColorModel() == D3DCOLOR_NONE) {
|
||||
m_draw_cursor = FALSE;
|
||||
is_modified = TRUE;
|
||||
}
|
||||
*/
|
||||
else {
|
||||
if (!m_3d_video_ram) {
|
||||
m_3d_video_ram = TRUE;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user