mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-02-22 03:31:31 +00:00
Make it compile with SDL2 again
For some reason SDL.h (or headers included by it) need some string functions (like strncmp) in inline-functions (that we don't even use). Str.h has #defines preventing their usage.. so #undef those in the (few) sourcefiles that need SDL headers
This commit is contained in:
parent
75f7fa3aa8
commit
ae02bb54a1
3 changed files with 25 additions and 4 deletions
|
@ -26,12 +26,19 @@ If you have questions concerning this license or the applicable additional terms
|
||||||
|
|
||||||
===========================================================================
|
===========================================================================
|
||||||
*/
|
*/
|
||||||
#include <SDL_cpuinfo.h>
|
|
||||||
|
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#include "../../idlib/precompiled.h"
|
#include "../../idlib/precompiled.h"
|
||||||
|
|
||||||
//#include "win_local.h"
|
// DG: SDL_*.h somehow needs the following functions, so #undef those silly
|
||||||
|
// "don't use" #defines from Str.h
|
||||||
|
#undef strcasecmp
|
||||||
|
#undef strncmp
|
||||||
|
#undef vsnprintf
|
||||||
|
// DG end
|
||||||
|
|
||||||
|
#include <SDL_cpuinfo.h>
|
||||||
|
|
||||||
|
|
||||||
#pragma warning(disable:4740) // warning C4740: flow in or out of inline asm code suppresses global optimization
|
#pragma warning(disable:4740) // warning C4740: flow in or out of inline asm code suppresses global optimization
|
||||||
#pragma warning(disable:4731) // warning C4731: 'XXX' : frame pointer register 'ebx' modified by inline assembly code
|
#pragma warning(disable:4731) // warning C4731: 'XXX' : frame pointer register 'ebx' modified by inline assembly code
|
||||||
|
|
|
@ -31,6 +31,13 @@ If you have questions concerning this license or the applicable additional terms
|
||||||
|
|
||||||
#include "../../idlib/precompiled.h"
|
#include "../../idlib/precompiled.h"
|
||||||
|
|
||||||
|
// DG: SDL.h somehow needs the following functions, so #undef those silly
|
||||||
|
// "don't use" #defines from Str.h
|
||||||
|
#undef strncmp
|
||||||
|
#undef strcasecmp
|
||||||
|
#undef vsnprintf
|
||||||
|
// DG end
|
||||||
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
|
||||||
#include "renderer/tr_local.h"
|
#include "renderer/tr_local.h"
|
||||||
|
|
|
@ -29,11 +29,18 @@ If you have questions concerning this license or the applicable additional terms
|
||||||
===========================================================================
|
===========================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../../idlib/precompiled.h"
|
||||||
|
|
||||||
|
// DG: SDL.h somehow needs the following functions, so #undef those silly
|
||||||
|
// "don't use" #defines from Str.h
|
||||||
|
#undef strncmp
|
||||||
|
#undef strcasecmp
|
||||||
|
#undef vsnprintf
|
||||||
|
// DG end
|
||||||
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
#include <SDL_syswm.h>
|
#include <SDL_syswm.h>
|
||||||
|
|
||||||
#include "../../idlib/precompiled.h"
|
|
||||||
|
|
||||||
#include "renderer/tr_local.h"
|
#include "renderer/tr_local.h"
|
||||||
#include "sdl_local.h"
|
#include "sdl_local.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue