Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37746422
en ru br
ALT Linux repos
S:96.2.350-alt1

Group :: Games/Educational
RPM: powdertoy

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: powdertoy-88.1.272-alt-xinit.patch
Download


--- src/PowderToySDL.cpp.orig	2013-08-26 14:26:31.759093478 +0000
+++ src/PowderToySDL.cpp	2013-08-26 14:28:27.868160462 +0000
@@ -380,6 +380,9 @@
 	int frameStart = SDL_GetTicks();
 	float frameTime;
 	float frameTimeAvg = 0.0f, correctedFrameTimeAvg = 0.0f;
+#ifdef OGLI	
+	float ratio, width, height;
+#endif
 	SDL_Event event;
 	while(engine->Running())
 	{
@@ -423,9 +426,9 @@
 #ifdef OGLI
 			case SDL_VIDEORESIZE:
 			{
-				float ratio = float(XRES+BARSIZE) / float(YRES+MENUSIZE);
-				float width = event.resize.w;
-				float height = width/ratio;
+				ratio = float(XRES+BARSIZE) / float(YRES+MENUSIZE);
+				width = event.resize.w;
+				height = width/ratio;
 
 				sdl_scrn = SDL_SetVideoMode(event.resize.w, height, 32, SDL_OPENGL | SDL_RESIZABLE);
 
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin