From bb9a4c9d125eaac464d732cf16b9d165418ee7d8 Mon Sep 17 00:00:00 2001 From: dimok789 Date: Wed, 2 Mar 2016 18:59:42 +0100 Subject: [PATCH] fix for TV display of console applications that are using OSScreen functions --- .gitignore | 3 ++- src/Application.cpp | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ec3c33c..2a0e2de 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ /sd_loader/build /sd_loader/*.elf /udp_debug_reader/obj -/udp_debug_reader/GeckoLog.txt \ No newline at end of file +/udp_debug_reader/GeckoLog.txt +/installer/sd_loader.h diff --git a/src/Application.cpp b/src/Application.cpp index c0d199c..e448028 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -197,4 +197,20 @@ void Application::executeThread(void) delete mainWindow; delete fontSystem; delete video; + + //!------------------------------------------------------------------------------------------------------------ + //! TODO: This is ugly and I don't really like it but I didn't find a better way for this to work. + //! It seems its necessary. to make one frame with max resolution to fix console application display ratio. + //!------------------------------------------------------------------------------------------------------------ + video = new CVideo(GX2_TV_SCAN_MODE_1080P, GX2_DRC_SINGLE); + video->prepareDrcRendering(); + video->drcDrawDone(); + video->prepareTvRendering(); + video->tvDrawDone(); + video->tvEnable(true); + video->drcEnable(true); + video->waitForVSync(); + video->tvEnable(false); + video->drcEnable(false); + delete video; }