Fixed a crash in the game options

This commit is contained in:
Sergii Pylypenko
2021-11-30 00:31:30 +02:00
parent a1ef54fa60
commit 0e08c41462
2 changed files with 3 additions and 1 deletions

View File

@@ -672,9 +672,11 @@ struct GameOptionsWindow : Window {
#endif
this->SetWidgetLoweredState(WID_GO_MOUSE_CURSOR, _settings_client.gui.draw_mouse_cursor);
#if 0
#ifndef __APPLE__
this->SetWidgetLoweredState(WID_GO_VIDEO_VSYNC_BUTTON, _video_vsync);
this->SetWidgetDisabledState(WID_GO_VIDEO_VSYNC_BUTTON, !_video_hw_accel);
#endif
#endif
bool missing_files = BaseGraphics::GetUsedSet()->GetNumMissing() == 0;

View File

@@ -356,7 +356,7 @@ struct DropdownWindow : Window {
if (_left_button_down && !this->left_button_state && (
_cursor.pos.x < this->left || _cursor.pos.x > this->left + this->width ||
_cursor.pos.y < this->top || _cursor.pos.y > this->top + this->height)) {
delete this;
this->Close();
return;
} else {
if (_left_button_down && !this->left_button_state) {