Browse Source

Fix pixel size calculation

Pabloader 5 years ago
parent
commit
b1baba707e
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      src/olcPixelGameEngine.cpp

+ 3
- 3
src/olcPixelGameEngine.cpp View File

1170
 	uint32_t PixelGameEngine::olc_GetMaximumPixelSize(uint32_t width, uint32_t height) 
1170
 	uint32_t PixelGameEngine::olc_GetMaximumPixelSize(uint32_t width, uint32_t height) 
1171
 	{
1171
 	{
1172
 #ifdef _WIN32
1172
 #ifdef _WIN32
1173
-		return 1; // TODO 
1173
+		return 1; // TODO
1174
 #else
1174
 #else
1175
 		Display* d = XOpenDisplay(NULL);
1175
 		Display* d = XOpenDisplay(NULL);
1176
 		int defaultScreen = DefaultScreen(d);
1176
 		int defaultScreen = DefaultScreen(d);
1187
 			}
1187
 			}
1188
 		}
1188
 		}
1189
 
1189
 
1190
-		uint32_t minScreenSize = std::min(width, height);
1190
+		uint32_t maxScreenSize = std::max(width, height);
1191
 
1191
 
1192
-		return minResolution / minScreenSize;		
1192
+		return minResolution / maxScreenSize;		
1193
 #endif
1193
 #endif
1194
 	}
1194
 	}
1195
 
1195
 

Loading…
Cancel
Save