resolution switch for windows fixed ( hopefully )
This commit is contained in:
parent
b16b0f00fc
commit
e290b6db82
|
@ -643,8 +643,6 @@ void getFullscreenVideoModes(list<ModeInfo> *modeinfos) {
|
|||
/* Print valid modes */
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] available Modes are:\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
int bestW = -1;
|
||||
int bestH = -1;
|
||||
for(int i=0; modes[i]; ++i) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"%d x %d\n",modes[i]->w, modes[i]->h,bpp);
|
||||
string lookupKey = intToStr(modes[i]->w) + "_" + intToStr(modes[i]->h) + "_" + intToStr(bpp);
|
||||
|
@ -653,7 +651,7 @@ void getFullscreenVideoModes(list<ModeInfo> *modeinfos) {
|
|||
modeinfos->push_back(ModeInfo(modes[i]->w,modes[i]->h,bpp));
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] adding resolution: %d x %d - %d.\n",__FILE__,__FUNCTION__,__LINE__,modes[i]->w,modes[i]->h,bpp);
|
||||
}
|
||||
// fake the missing 16 bit resolutions in linux
|
||||
// fake the missing 16 bit resolutions
|
||||
string lookupKey16 = intToStr(modes[i]->w) + "_" + intToStr(modes[i]->h) + "_" + intToStr(16);
|
||||
if(uniqueResList.find(lookupKey16) == uniqueResList.end()) {
|
||||
uniqueResList[lookupKey16] = true;
|
||||
|
|
|
@ -748,15 +748,20 @@ void getFullscreenVideoModes(list<ModeInfo> *modeinfos) {
|
|||
/* Print valid modes */
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] available Modes are:\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
int bestW = -1;
|
||||
int bestH = -1;
|
||||
for(int i=0; modes[i]; ++i) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"%d x %d\n",modes[i]->w, modes[i]->h,modes[i]->x);
|
||||
string lookupKey = intToStr(modes[i]->w) + "_" + intToStr(modes[i]->h) + "_" + intToStr(modes[i]->x);
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"%d x %d\n",modes[i]->w, modes[i]->h,bpp);
|
||||
string lookupKey = intToStr(modes[i]->w) + "_" + intToStr(modes[i]->h) + "_" + intToStr(bpp);
|
||||
if(uniqueResList.find(lookupKey) == uniqueResList.end()) {
|
||||
uniqueResList[lookupKey] = true;
|
||||
modeinfos->push_back(ModeInfo(modes[i]->w,modes[i]->h,modes[i]->x));
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] adding resolution: %d x %d.\n",__FILE__,__FUNCTION__,__LINE__,modes[i]->w,modes[i]->h);
|
||||
modeinfos->push_back(ModeInfo(modes[i]->w,modes[i]->h,bpp));
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] adding resolution: %d x %d - %d.\n",__FILE__,__FUNCTION__,__LINE__,modes[i]->w,modes[i]->h,bpp);
|
||||
}
|
||||
// fake the missing 16 bit resolutions
|
||||
string lookupKey16 = intToStr(modes[i]->w) + "_" + intToStr(modes[i]->h) + "_" + intToStr(16);
|
||||
if(uniqueResList.find(lookupKey16) == uniqueResList.end()) {
|
||||
uniqueResList[lookupKey16] = true;
|
||||
modeinfos->push_back(ModeInfo(modes[i]->w,modes[i]->h,16));
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] adding resolution: %d x %d - %d.\n",__FILE__,__FUNCTION__,__LINE__,modes[i]->w,modes[i]->h,16);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -865,14 +870,14 @@ bool isKeyDown(int virtualKey){
|
|||
// ModeInfo
|
||||
// =====================================
|
||||
|
||||
ModeInfo::ModeInfo(int w, int h, int d) {
|
||||
width=w;
|
||||
height=h;
|
||||
depth=d;
|
||||
}
|
||||
|
||||
string ModeInfo::getString() const{
|
||||
return intToStr(width)+"x"+intToStr(height);
|
||||
}
|
||||
ModeInfo::ModeInfo(int w, int h, int d) {
|
||||
width=w;
|
||||
height=h;
|
||||
depth=d;
|
||||
}
|
||||
|
||||
string ModeInfo::getString() const{
|
||||
return intToStr(width)+"x"+intToStr(height)+"-"+intToStr(depth);
|
||||
}
|
||||
|
||||
}}//end namespace
|
||||
|
|
Loading…
Reference in New Issue