mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-06-12 19:36:33 +00:00
Fixed code that removed 15-bit color mode.
15-bit color mode is now removed on all platforms. The removal of 15-bit color mode now happens before the sort. Updated a variable name. Changed list length calculation to use C++'s clever pointer subtraction.
This commit is contained in:
parent
57b9ad0d95
commit
241162f261
|
@ -1636,13 +1636,12 @@ bool VideoInit(bool classic)
|
|||
ErrorAlert(STR_UNSUPP_DEPTH_ERR);
|
||||
return false;
|
||||
}
|
||||
std::sort(avail_depths, avail_depths + num_depths);
|
||||
|
||||
#ifdef __APPLE__
|
||||
// 15-bit color does not seem to work on OS X
|
||||
int *last = std::remove(avail_depths, avail_depths + num_depths, 15);
|
||||
num_depths = ( (size_t)last - (size_t)avail_depths ) / sizeof(int);
|
||||
#endif
|
||||
int *list_end = std::remove(avail_depths, avail_depths + num_depths,
|
||||
15);
|
||||
num_depths = list_end - avail_depths;
|
||||
std::sort(avail_depths, avail_depths + num_depths);
|
||||
|
||||
#ifdef ENABLE_FBDEV_DGA
|
||||
// Frame buffer name
|
||||
|
|
Loading…
Reference in New Issue
Block a user