]> Shamusworld >> Repos - apple2/commitdiff
Fix trash on sides of screen in full screen mode.
authorShamus Hammons <jlhamm@acm.org>
Tue, 8 Sep 2020 22:03:17 +0000 (17:03 -0500)
committerShamus Hammons <jlhamm@acm.org>
Tue, 8 Sep 2020 22:03:17 +0000 (17:03 -0500)
Also, added a bit more diagnostics for the case when the audio subsystem
fails to initialize.

src/sound.cpp
src/video.cpp

index 04b2670cb9ab2987b5e9add084089f1299936452..9ad8f8dd45ff4e09b676edb8026193c019a6771c 100644 (file)
@@ -79,6 +79,7 @@ void SoundInit(void)
        if (device == 0)
        {
                WriteLog("Sound: Failed to initialize SDL sound.\n");
+               WriteLog("SDL sez: %s\n", SDL_GetError());
                return;
        }
 
index 7309910e24b89848a9f36a2dbc18f3f36712c4c0..c9c01735d709eea8a5c8f02070371f9e3c9a4c7c 100644 (file)
@@ -24,8 +24,6 @@
 //   there [DONE]
 //
 
-// Display routines seem MUCH slower now... !!! INVESTIGATE !!! [not anymore]
-
 #include "video.h"
 
 #include <string.h>                                    // for memset()
@@ -605,9 +603,9 @@ static void Render80ColumnText(void)
 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!
@@ -1232,6 +1230,7 @@ void RenderAppleScreen(SDL_Renderer * renderer)
        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);
 }