commit a22e4a163bb2cbf0939b4b73f4f889012c0fb414
Author: Fabian Greffrath <fabian@greffrath.com>
AuthorDate: Mon Mar 17 17:22:37 2014 +0100
Commit: Fabian Greffrath <fabian@greffrath.com>
CommitDate: Mon Mar 17 17:22:37 2014 +0100
Add some strictly unnecessary curly braces.
---
src/v_video.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/v_video.c b/src/v_video.c
index 60817086..4f38c5c3 100644
--- a/src/v_video.c
+++ b/src/v_video.c
@@ -738,12 +738,16 @@ void WritePNGfile(char *filename, byte *data,
handle = fopen(filename, "wb");
if (!handle)
+ {
return;
+ }
ppng = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL,
error_fn, warning_fn);
if (!ppng)
+ {
return;
+ }
pinfo = png_create_info_struct(ppng);
if (!pinfo)
@@ -778,7 +782,9 @@ void WritePNGfile(char *filename, byte *data,
png_write_info(ppng, pinfo);
for (i = 0; i < SCREENHEIGHT; i++)
+ {
png_write_row(ppng, data + i*SCREENWIDTH);
+ }
png_write_end(ppng, pinfo);
png_destroy_write_struct(&ppng, &pinfo);
@@ -801,10 +807,14 @@ void V_ScreenShot(char *format)
#ifdef HAVE_LIBPNG
if (png_screenshots)
+ {
ext = "png";
+ }
else
#endif
+ {
ext = "pcx";
+ }
for (i=0; i<=99; i++)
{
@@ -823,15 +833,19 @@ void V_ScreenShot(char *format)
#ifdef HAVE_LIBPNG
if (png_screenshots)
+ {
WritePNGfile(lbmname, I_VideoBuffer,
SCREENWIDTH, SCREENHEIGHT,
W_CacheLumpName (DEH_String("PLAYPAL"), PU_CACHE));
+ }
else
#endif
+ {
// save the pcx file
WritePCXfile(lbmname, I_VideoBuffer,
SCREENWIDTH, SCREENHEIGHT,
W_CacheLumpName (DEH_String("PLAYPAL"), PU_CACHE));
+ }
}
#define MOUSE_SPEED_BOX_WIDTH 120