瀏覽代碼

Fix pixel size calculation

Pabloader 4 年之前
父節點
當前提交
b1baba707e
共有 1 個檔案被更改,包括 3 行新增3 行删除
  1. 3
    3
      src/olcPixelGameEngine.cpp

+ 3
- 3
src/olcPixelGameEngine.cpp 查看文件

@@ -1170,7 +1170,7 @@ namespace olc
1170 1170
 	uint32_t PixelGameEngine::olc_GetMaximumPixelSize(uint32_t width, uint32_t height) 
1171 1171
 	{
1172 1172
 #ifdef _WIN32
1173
-		return 1; // TODO 
1173
+		return 1; // TODO
1174 1174
 #else
1175 1175
 		Display* d = XOpenDisplay(NULL);
1176 1176
 		int defaultScreen = DefaultScreen(d);
@@ -1187,9 +1187,9 @@ namespace olc
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 1193
 #endif
1194 1194
 	}
1195 1195
 

Loading…
取消
儲存