Also, added a bit more diagnostics for the case when the audio subsystem
fails to initialize.
if (device == 0)
{
WriteLog("Sound: Failed to initialize SDL sound.\n");
if (device == 0)
{
WriteLog("Sound: Failed to initialize SDL sound.\n");
+ WriteLog("SDL sez: %s\n", SDL_GetError());
-// Display routines seem MUCH slower now... !!! INVESTIGATE !!! [not anymore]
-
#include "video.h"
#include <string.h> // for memset()
#include "video.h"
#include <string.h> // for memset()
static void RenderLoRes(uint16_t toLine/*= 24*/)
{
// NOTE: The green mono rendering doesn't skip every other line... !!! FIX !!!
static void RenderLoRes(uint16_t toLine/*= 24*/)
{
// NOTE: The green mono rendering doesn't skip every other line... !!! FIX !!!
-// Also, we could set up three different Render functions depending on which
-// render type was set and call it with a function pointer. Would be faster
-// then the nested ifs we have now.
+// Also, we could set up three different Render functions depending on
+// which render type was set and call it with a function pointer. Would
+// be faster than the nested ifs we have now.
/*
Note that these colors correspond to the bit patterns generated by the numbers 0-F in order:
Color #s correspond to the bit patterns in reverse... Interesting!
/*
Note that these colors correspond to the bit patterns generated by the numbers 0-F in order:
Color #s correspond to the bit patterns in reverse... Interesting!
SDL_LockTexture(sdlTexture, NULL, (void **)&scrBuffer, &scrPitch);
RenderVideoFrame();
SDL_UnlockTexture(sdlTexture);
SDL_LockTexture(sdlTexture, NULL, (void **)&scrBuffer, &scrPitch);
RenderVideoFrame();
SDL_UnlockTexture(sdlTexture);
+ SDL_RenderClear(renderer); // Without this, full screen has trash on the sides
SDL_RenderCopy(renderer, sdlTexture, NULL, NULL);
}
SDL_RenderCopy(renderer, sdlTexture, NULL, NULL);
}