fix nvjpg icon loading if w*bpp != pitch. add build option to enable/disable nvjpg (for testing).

This commit is contained in:
ITotalJustice
2025-06-03 02:16:23 +01:00
parent 7a83269d98
commit e88ca8ede1
4 changed files with 52 additions and 14 deletions

View File

@@ -1400,9 +1400,11 @@ App::App(const char* argv0) {
curl::Init();
#ifdef USE_NVJPG
// this has to be init before deko3d.
nj::initialize();
m_decoder.initialize();
#endif
// get current size of the framebuffer
const auto fb = GetFrameBufferSize();
@@ -1883,8 +1885,10 @@ App::~App() {
nvgDeleteDk(this->vg);
this->renderer.reset();
#ifdef USE_NVJPG
m_decoder.finalize();
nj::finalize();
#endif
// backup hbmenu if it is not sphaira
if (App::GetReplaceHbmenuEnable() && !IsHbmenu()) {