Enable debug console prints in non-debug builds
This commit is contained in:
parent
53c0e8470f
commit
2e5e1994c2
5 changed files with 0 additions and 18 deletions
|
@ -2,9 +2,7 @@
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#ifndef NDEBUG
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#endif
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
@ -168,12 +166,10 @@ BOOL AudioBackend_Init(void)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NDEBUG
|
|
||||||
puts("Available SDL2 audio drivers:");
|
puts("Available SDL2 audio drivers:");
|
||||||
|
|
||||||
for (int i = 0; i < SDL_GetNumAudioDrivers(); ++i)
|
for (int i = 0; i < SDL_GetNumAudioDrivers(); ++i)
|
||||||
puts(SDL_GetAudioDriver(i));
|
puts(SDL_GetAudioDriver(i));
|
||||||
#endif
|
|
||||||
|
|
||||||
SDL_AudioSpec specification;
|
SDL_AudioSpec specification;
|
||||||
specification.freq = 44100;
|
specification.freq = 44100;
|
||||||
|
@ -195,9 +191,7 @@ BOOL AudioBackend_Init(void)
|
||||||
|
|
||||||
SDL_PauseAudioDevice(device_id, 0);
|
SDL_PauseAudioDevice(device_id, 0);
|
||||||
|
|
||||||
#ifndef NDEBUG
|
|
||||||
printf("Selected SDL2 audio driver: %s\n", SDL_GetCurrentAudioDriver());
|
printf("Selected SDL2 audio driver: %s\n", SDL_GetCurrentAudioDriver());
|
||||||
#endif
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -565,11 +565,9 @@ Backend_Surface* Backend_Init(const char *title, int width, int height, BOOL ful
|
||||||
if (GLAD_GL_VERSION_3_2)
|
if (GLAD_GL_VERSION_3_2)
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
#ifndef NDEBUG
|
|
||||||
printf("GL_VENDOR = %s\n", glGetString(GL_VENDOR));
|
printf("GL_VENDOR = %s\n", glGetString(GL_VENDOR));
|
||||||
printf("GL_RENDERER = %s\n", glGetString(GL_RENDERER));
|
printf("GL_RENDERER = %s\n", glGetString(GL_RENDERER));
|
||||||
printf("GL_VERSION = %s\n", glGetString(GL_VERSION));
|
printf("GL_VERSION = %s\n", glGetString(GL_VERSION));
|
||||||
#endif
|
|
||||||
|
|
||||||
// Set up blending (only used for font-rendering)
|
// Set up blending (only used for font-rendering)
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
#include "../Rendering.h"
|
#include "../Rendering.h"
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#ifndef NDEBUG
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#endif
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "SDL.h"
|
#include "SDL.h"
|
||||||
|
@ -119,7 +117,6 @@ static void GlyphBatch_DestroyTexture(SPRITEBATCH_U64 texture_id, void *udata)
|
||||||
|
|
||||||
Backend_Surface* Backend_Init(const char *title, int width, int height, BOOL fullscreen)
|
Backend_Surface* Backend_Init(const char *title, int width, int height, BOOL fullscreen)
|
||||||
{
|
{
|
||||||
#ifndef NDEBUG
|
|
||||||
puts("Available SDL2 render drivers:");
|
puts("Available SDL2 render drivers:");
|
||||||
|
|
||||||
for (int i = 0; i < SDL_GetNumRenderDrivers(); ++i)
|
for (int i = 0; i < SDL_GetNumRenderDrivers(); ++i)
|
||||||
|
@ -128,7 +125,6 @@ Backend_Surface* Backend_Init(const char *title, int width, int height, BOOL ful
|
||||||
SDL_GetRenderDriverInfo(i, &info);
|
SDL_GetRenderDriverInfo(i, &info);
|
||||||
puts(info.name);
|
puts(info.name);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
window = SDL_CreateWindow(title, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, width, height, 0);
|
window = SDL_CreateWindow(title, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, width, height, 0);
|
||||||
|
|
||||||
|
@ -154,11 +150,9 @@ Backend_Surface* Backend_Init(const char *title, int width, int height, BOOL ful
|
||||||
|
|
||||||
if (renderer != NULL)
|
if (renderer != NULL)
|
||||||
{
|
{
|
||||||
#ifndef NDEBUG
|
|
||||||
SDL_RendererInfo info;
|
SDL_RendererInfo info;
|
||||||
SDL_GetRendererInfo(renderer, &info);
|
SDL_GetRendererInfo(renderer, &info);
|
||||||
printf("Selected SDL2 render driver: %s\n", info.name);
|
printf("Selected SDL2 render driver: %s\n", info.name);
|
||||||
#endif
|
|
||||||
|
|
||||||
int width, height;
|
int width, height;
|
||||||
SDL_GetRendererOutputSize(renderer, &width, &height);
|
SDL_GetRendererOutputSize(renderer, &width, &height);
|
||||||
|
|
|
@ -87,14 +87,12 @@ BOOL Flip_SystemTask(void)
|
||||||
|
|
||||||
BOOL StartDirectDraw(const char *title, int width, int height, int lMagnification)
|
BOOL StartDirectDraw(const char *title, int width, int height, int lMagnification)
|
||||||
{
|
{
|
||||||
#ifndef NDEBUG
|
|
||||||
puts("Available SDL2 video drivers:");
|
puts("Available SDL2 video drivers:");
|
||||||
|
|
||||||
for (int i = 0; i < SDL_GetNumVideoDrivers(); ++i)
|
for (int i = 0; i < SDL_GetNumVideoDrivers(); ++i)
|
||||||
puts(SDL_GetVideoDriver(i));
|
puts(SDL_GetVideoDriver(i));
|
||||||
|
|
||||||
printf("Selected SDL2 video driver: %s\n", SDL_GetCurrentVideoDriver());
|
printf("Selected SDL2 video driver: %s\n", SDL_GetCurrentVideoDriver());
|
||||||
#endif
|
|
||||||
|
|
||||||
memset(surface_metadata, 0, sizeof(surface_metadata));
|
memset(surface_metadata, 0, sizeof(surface_metadata));
|
||||||
|
|
||||||
|
|
|
@ -44,10 +44,8 @@ BOOL FindAndOpenDirectInputDevice(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
#ifndef NDEBUG
|
|
||||||
for (i = 0; i < SDL_NumJoysticks(); ++i)
|
for (i = 0; i < SDL_NumJoysticks(); ++i)
|
||||||
printf("Joystick #%d name: %s\n", i, SDL_JoystickNameForIndex(i));
|
printf("Joystick #%d name: %s\n", i, SDL_JoystickNameForIndex(i));
|
||||||
#endif
|
|
||||||
|
|
||||||
// Open first available joystick
|
// Open first available joystick
|
||||||
for (i = 0; i < SDL_NumJoysticks(); ++i)
|
for (i = 0; i < SDL_NumJoysticks(); ++i)
|
||||||
|
|
Loading…
Add table
Reference in a new issue