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:
VoxelTek 2025-06-17 14:17:36 +10:00
parent 0cfcc0fb21
commit 4a3d5ec8ac
3 changed files with 21 additions and 0 deletions

View File

@ -50,6 +50,8 @@ message(STATUS "Internal miniwin: ${ISLE_MINIWIN}")
message(STATUS "Isle debugging: ${ISLE_DEBUG}") message(STATUS "Isle debugging: ${ISLE_DEBUG}")
message(STATUS "Compile shaders: ${ISLE_COMPILE_SHADERS}") message(STATUS "Compile shaders: ${ISLE_COMPILE_SHADERS}")
message(STATUS "Fetching SDL3, please wait...")
if (DOWNLOAD_DEPENDENCIES) if (DOWNLOAD_DEPENDENCIES)
# FetchContent downloads and configures dependencies # FetchContent downloads and configures dependencies
include(FetchContent) include(FetchContent)

View File

@ -121,6 +121,10 @@ void CMainDialog::OnList3DevicesSelectionChanged(int selected)
{ {
LegoDeviceEnumerate* device_enumerator = currentConfigApp->m_device_enumerator; LegoDeviceEnumerate* device_enumerator = currentConfigApp->m_device_enumerator;
device_enumerator->GetDevice(selected, currentConfigApp->m_driver, currentConfigApp->m_device); 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) { if (currentConfigApp->GetHardwareDeviceColorModel() != D3DCOLOR_NONE) {
m_ui->drawCursorCheckBox->setEnabled(true); 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->videomemoryCheckBox->setChecked(currentConfigApp->m_3d_video_ram);
m_ui->flipVideoMemoryPagesCheckBox->setChecked(currentConfigApp->m_flip_surfaces); 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; m_modified = true;
UpdateInterface(); UpdateInterface();
} }
@ -159,6 +171,9 @@ void CMainDialog::UpdateInterface()
m_ui->videomemoryCheckBox->setChecked(currentConfigApp->m_3d_video_ram); m_ui->videomemoryCheckBox->setChecked(currentConfigApp->m_3d_video_ram);
bool full_screen = currentConfigApp->m_full_screen; bool full_screen = currentConfigApp->m_full_screen;
currentConfigApp->AdjustDisplayBitDepthBasedOnRenderStatus(); 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) { if (currentConfigApp->GetHardwareDeviceColorModel() != D3DCOLOR_NONE) {
m_ui->drawCursorCheckBox->setChecked(true); m_ui->drawCursorCheckBox->setChecked(true);
} }
@ -167,6 +182,7 @@ void CMainDialog::UpdateInterface()
currentConfigApp->m_draw_cursor = FALSE; currentConfigApp->m_draw_cursor = FALSE;
m_ui->drawCursorCheckBox->setEnabled(false); m_ui->drawCursorCheckBox->setEnabled(false);
} }
*/
if (full_screen) { if (full_screen) {
if (currentConfigApp->m_display_bit_depth == 8) { if (currentConfigApp->m_display_bit_depth == 8) {
m_ui->colorPalette256RadioButton->setChecked(true); m_ui->colorPalette256RadioButton->setChecked(true);

View File

@ -175,10 +175,13 @@ bool CConfigApp::ValidateSettings()
is_modified = TRUE; 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) { if (GetHardwareDeviceColorModel() == D3DCOLOR_NONE) {
m_draw_cursor = FALSE; m_draw_cursor = FALSE;
is_modified = TRUE; is_modified = TRUE;
} }
*/
else { else {
if (!m_3d_video_ram) { if (!m_3d_video_ram) {
m_3d_video_ram = TRUE; m_3d_video_ram = TRUE;