diff render_sdl.c @ 272:9b04b57434b5

Implement LDI
author Mike Pavone <pavone@retrodev.com>
date Thu, 02 May 2013 22:26:47 -0700
parents 7ccc4ae86e07
children 8e2fa485c0f2
line wrap: on
line diff
--- a/render_sdl.c	Thu May 02 22:21:41 2013 -0700
+++ b/render_sdl.c	Thu May 02 22:26:47 2013 -0700
@@ -366,7 +366,7 @@
 		}
 	}
 	//TODO: Adjust frame delay so we actually get 60 FPS rather than 62.5 FPS
-	uint32_t current = SDL_GetTicks();
+	/*uint32_t current = SDL_GetTicks();
 	uint32_t desired = last_frame + FRAME_DELAY;
 	if (current < desired) {
 		uint32_t delay = last_frame + FRAME_DELAY - current;
@@ -376,14 +376,14 @@
 		}
 		while ((desired) >= SDL_GetTicks()) {
 		}
-	}
+	}*/
 	render_context(context);
 	
-	/*
+	
 	//TODO: Figure out why this causes segfaults
-	frame_counter++;
+	/*frame_counter++;
 	if ((last_frame - start) > 1000) {
-		if (start) {
+		if (start && (last_frame-start)) {
 			printf("\r%f fps", ((float)frame_counter) / (((float)(last_frame-start)) / 1000.0));
 			fflush(stdout);
 		}