From 783ef32e670e472e16ff251f1a64ffd7145fd0fd Mon Sep 17 00:00:00 2001 From: Spoike Date: Mon, 26 Jun 2017 09:35:23 +0000 Subject: [PATCH] enable the bmp screenshots code. needs testing. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5121 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_screen.c | 2 +- engine/client/image.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/engine/client/cl_screen.c b/engine/client/cl_screen.c index 4da92cd37..f717d77fc 100644 --- a/engine/client/cl_screen.c +++ b/engine/client/cl_screen.c @@ -2117,7 +2117,7 @@ qboolean screenshotJPEG(char *filename, enum fs_relative fsroot, int compression #ifdef AVAIL_PNGLIB int Image_WritePNG (char *filename, enum fs_relative fsroot, int compression, void **buffers, int numbuffers, int bytestride, int width, int height, enum uploadfmt fmt); #endif -void WriteBMPFile(char *filename, enum fs_relative fsroot, qbyte *in, int bytestride, int width, int height); +qboolean WriteBMPFile(char *filename, enum fs_relative fsroot, qbyte *in, int instride, int width, int height, uploadfmt_t fmt); qboolean WriteTGA(char *filename, enum fs_relative fsroot, qbyte *fte_restrict rgb_buffer, int bytestride, int width, int height, enum uploadfmt fmt) { diff --git a/engine/client/image.c b/engine/client/image.c index 778fcec2d..7a3d62d90 100644 --- a/engine/client/image.c +++ b/engine/client/image.c @@ -2204,7 +2204,7 @@ qbyte *ReadBMPFile(qbyte *buf, int length, int *width, int *height) return NULL; } -void WriteBMPFile(char *filename, enum fs_relative fsroot, qbyte *in, int instride, int width, int height, uploadfmt_t fmt) +qboolean WriteBMPFile(char *filename, enum fs_relative fsroot, qbyte *in, int instride, int width, int height, uploadfmt_t fmt) { int y; bmpheader_t h; @@ -2263,7 +2263,7 @@ void WriteBMPFile(char *filename, enum fs_relative fsroot, qbyte *in, int instri break; default: - return; + return false; } @@ -2305,6 +2305,8 @@ void WriteBMPFile(char *filename, enum fs_relative fsroot, qbyte *in, int instri COM_WriteFile(filename, fsroot, data, h.Size); BZ_Free(data); + + return true; }