40 |
|
|
41 |
|
|
42 |
|
// List of supported video modes |
43 |
< |
std::vector<video_mode> VideoModes; |
43 |
> |
vector<video_mode> VideoModes; |
44 |
|
|
45 |
|
// Description of the main monitor |
46 |
|
monitor_desc VideoMonitor; |
67 |
|
|
68 |
|
static bool has_resolution(uint32 id) |
69 |
|
{ |
70 |
< |
std::vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end(); |
70 |
> |
vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end(); |
71 |
|
while (i != end) { |
72 |
|
if (i->resolution_id == id) |
73 |
|
return true; |
81 |
|
* Find specified mode (depth/resolution) (or VideoModes.end() if not found) |
82 |
|
*/ |
83 |
|
|
84 |
< |
static std::vector<video_mode>::const_iterator find_mode(uint16 mode, uint32 id) |
84 |
> |
static vector<video_mode>::const_iterator find_mode(uint16 mode, uint32 id) |
85 |
|
{ |
86 |
< |
std::vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end(); |
86 |
> |
vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end(); |
87 |
|
while (i != end) { |
88 |
|
if (i->resolution_id == id && DepthToAppleMode(i->depth) == mode) |
89 |
|
return i; |
100 |
|
static video_depth max_depth_of_resolution(uint32 id) |
101 |
|
{ |
102 |
|
video_depth m = VDEPTH_1BIT; |
103 |
< |
std::vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end(); |
103 |
> |
vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end(); |
104 |
|
while (i != end) { |
105 |
|
if (i->depth > m) |
106 |
|
m = i->depth; |
116 |
|
|
117 |
|
static void get_size_of_resolution(uint32 id, uint32 &x, uint32 &y) |
118 |
|
{ |
119 |
< |
std::vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end(); |
119 |
> |
vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end(); |
120 |
|
while (i != end) { |
121 |
|
if (i->resolution_id == id) { |
122 |
|
x = i->x; |
335 |
|
return paramErr; |
336 |
|
|
337 |
|
if (mode != VidLocal.current_mode) { |
338 |
< |
std::vector<video_mode>::const_iterator i = find_mode(mode, VidLocal.current_id); |
338 |
> |
vector<video_mode>::const_iterator i = find_mode(mode, VidLocal.current_id); |
339 |
|
if (i == VideoModes.end()) |
340 |
|
return paramErr; |
341 |
|
set_gray_palette(); |
494 |
|
return paramErr; |
495 |
|
|
496 |
|
if (mode != VidLocal.current_mode || id != VidLocal.current_id) { |
497 |
< |
std::vector<video_mode>::const_iterator i = find_mode(mode, id); |
497 |
> |
vector<video_mode>::const_iterator i = find_mode(mode, id); |
498 |
|
if (i == VideoModes.end()) |
499 |
|
return paramErr; |
500 |
|
set_gray_palette(); |
751 |
|
uint16 mode = ReadMacInt16(param + csDepthMode); |
752 |
|
D(bug(" GetVideoParameters %04x/%08x\n", mode, id)); |
753 |
|
|
754 |
< |
std::vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end(); |
754 |
> |
vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end(); |
755 |
|
while (i != end) { |
756 |
|
if (DepthToAppleMode(i->depth) == mode && i->resolution_id == id) { |
757 |
|
uint32 vp = ReadMacInt32(param + csVPBlockPtr); |