mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-18 16:03:05 +00:00
cleanup; fix endian bug which caused the dreaded Simon1 hang on MacOS (_palette_color_count was treated as a 32 bit int when it is only 16 bit -> once again proves that one should be really really carefully with pointer cast hacks!)
svn-id: r11835
This commit is contained in:
parent
e342d624d0
commit
dfa5e09aec
@ -2420,7 +2420,7 @@ void SimonEngine::set_video_mode_internal(uint mode, uint vga_res_id) {
|
||||
if (!(_game & GF_SIMON2)) {
|
||||
if (_unk_pal_flag) {
|
||||
_unk_pal_flag = false;
|
||||
while (*(volatile int *)&_palette_color_count != 0) {
|
||||
while (_palette_color_count != 0) {
|
||||
delay(10);
|
||||
}
|
||||
}
|
||||
@ -2432,7 +2432,7 @@ void SimonEngine::set_video_mode(uint mode, uint vga_res_id) {
|
||||
lock();
|
||||
if (_lock_word == 0) {
|
||||
_sync_flag_1 = true;
|
||||
while ((*(volatile bool *)&_sync_flag_1) == true) {
|
||||
while (_sync_flag_1) {
|
||||
delay(10);
|
||||
}
|
||||
}
|
||||
@ -2440,7 +2440,7 @@ void SimonEngine::set_video_mode(uint mode, uint vga_res_id) {
|
||||
|
||||
_lock_word |= 0x20;
|
||||
|
||||
while ((*(volatile uint16*)&_lock_word) & 2) {
|
||||
while (_lock_word & 2) {
|
||||
delay(10);
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,7 @@ protected:
|
||||
bool _vga_res_328_loaded;
|
||||
bool _hitarea_unk_3;
|
||||
bool _mortal_flag;
|
||||
bool _sync_flag_1;
|
||||
volatile bool _sync_flag_1;
|
||||
byte _video_var_8;
|
||||
bool _use_palette_delay;
|
||||
bool _sync_flag_2;
|
||||
@ -248,12 +248,12 @@ protected:
|
||||
Item *_dummy_item_2;
|
||||
Item *_dummy_item_3;
|
||||
|
||||
uint16 _lock_word;
|
||||
volatile uint16 _lock_word;
|
||||
uint16 _scroll_up_hit_area;
|
||||
uint16 _scroll_down_hit_area;
|
||||
|
||||
uint16 _video_var_7;
|
||||
uint16 _palette_color_count;
|
||||
volatile uint16 _palette_color_count;
|
||||
|
||||
byte _video_var_4;
|
||||
bool _video_var_5;
|
||||
|
Loading…
x
Reference in New Issue
Block a user