Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 404 vs 449 for /trunk/Source Code/Platform/Video/GFXState.cpp

Diff revisions: vs.
  @@ -69,10 +69,16 @@
69 69 _loadQueueCV.notify_one();
70 70 }
71 71
72 - void GPUState::registerDisplayMode(const GPUVideoMode& mode) {
72 + void GPUState::registerDisplayMode(U8 displayIndex, const GPUVideoMode& mode) {
73 + if (displayIndex >= _supportedDislpayModes.size()) {
74 + _supportedDislpayModes.push_back(vectorImpl<GPUVideoMode>());
75 + }
76 +
77 + vectorImpl<GPUVideoMode>& displayModes = _supportedDislpayModes[displayIndex];
78 +
73 79 // this is terribly slow, but should only be called a couple of times and
74 80 // only on video hardware init
75 - for (GPUVideoMode& crtMode : _supportedDislpayModes) {
81 + for (GPUVideoMode& crtMode : displayModes) {
76 82 if (crtMode._resolution == mode._resolution &&
77 83 crtMode._bitDepth == mode._bitDepth) {
78 84 U8 crtRefresh = mode._refreshRate.front();
  @@ -85,7 +91,8 @@
85 91 return;
86 92 }
87 93 }
88 - _supportedDislpayModes.push_back(mode);
94 +
95 + displayModes.push_back(mode);
89 96 }
90 97
91 98 }; // namespace Divide