mirror of
https://github.com/dhewm/dhewm3.git
synced 2024-11-26 22:31:17 +00:00
Fix endless loop in GLimp_Init(), #386
shouldn't have reused i in the inner loop..
This commit is contained in:
parent
dc42bdc873
commit
52ea5b3877
1 changed files with 3 additions and 3 deletions
|
@ -252,13 +252,13 @@ bool GLimp_Init(glimpParms_t parms) {
|
|||
SDL_GetGlobalMouseState(&x, &y);
|
||||
|
||||
int numDisplays = SDL_GetNumVideoDisplays();
|
||||
for (i=0; i<numDisplays; ++i) {
|
||||
for ( int j=0; j<numDisplays; ++j ) {
|
||||
SDL_Rect rect;
|
||||
if (SDL_GetDisplayBounds(i, &rect) == 0) {
|
||||
if (SDL_GetDisplayBounds(j, &rect) == 0) {
|
||||
if ( x >= rect.x && x < rect.x + rect.w
|
||||
&& y >= rect.y && y < rect.y + rect.h )
|
||||
{
|
||||
displayIndex = i;
|
||||
displayIndex = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue