mirror of
https://github.com/glest/glest-source.git
synced 2025-08-18 14:11:15 +02:00
resolution switch for windows fixed ( hopefully )
This commit is contained in:
@@ -643,8 +643,6 @@ void getFullscreenVideoModes(list<ModeInfo> *modeinfos) {
|
|||||||
/* Print valid modes */
|
/* Print valid modes */
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] available Modes are:\n",__FILE__,__FUNCTION__,__LINE__);
|
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) {
|
for(int i=0; modes[i]; ++i) {
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"%d x %d\n",modes[i]->w, modes[i]->h,bpp);
|
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);
|
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));
|
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);
|
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);
|
string lookupKey16 = intToStr(modes[i]->w) + "_" + intToStr(modes[i]->h) + "_" + intToStr(16);
|
||||||
if(uniqueResList.find(lookupKey16) == uniqueResList.end()) {
|
if(uniqueResList.find(lookupKey16) == uniqueResList.end()) {
|
||||||
uniqueResList[lookupKey16] = true;
|
uniqueResList[lookupKey16] = true;
|
||||||
|
@@ -748,15 +748,20 @@ void getFullscreenVideoModes(list<ModeInfo> *modeinfos) {
|
|||||||
/* Print valid modes */
|
/* Print valid modes */
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] available Modes are:\n",__FILE__,__FUNCTION__,__LINE__);
|
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) {
|
for(int i=0; modes[i]; ++i) {
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"%d x %d\n",modes[i]->w, modes[i]->h,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(modes[i]->x);
|
string lookupKey = intToStr(modes[i]->w) + "_" + intToStr(modes[i]->h) + "_" + intToStr(bpp);
|
||||||
if(uniqueResList.find(lookupKey) == uniqueResList.end()) {
|
if(uniqueResList.find(lookupKey) == uniqueResList.end()) {
|
||||||
uniqueResList[lookupKey] = true;
|
uniqueResList[lookupKey] = true;
|
||||||
modeinfos->push_back(ModeInfo(modes[i]->w,modes[i]->h,modes[i]->x));
|
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.\n",__FILE__,__FUNCTION__,__LINE__,modes[i]->w,modes[i]->h);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -872,7 +877,7 @@ ModeInfo::ModeInfo(int w, int h, int d) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
string ModeInfo::getString() const{
|
string ModeInfo::getString() const{
|
||||||
return intToStr(width)+"x"+intToStr(height);
|
return intToStr(width)+"x"+intToStr(height)+"-"+intToStr(depth);
|
||||||
}
|
}
|
||||||
|
|
||||||
}}//end namespace
|
}}//end namespace
|
||||||
|
Reference in New Issue
Block a user