use oss-nvjpg for loading jpeg images (homebrew, games and themezer).

slightly faster loading on avg compared to stbi.
This commit is contained in:
ITotalJustice
2025-06-02 22:18:38 +01:00
parent 8485ff1e99
commit 4be1d48215
10 changed files with 146 additions and 43 deletions

View File

@@ -10,6 +10,7 @@
#include "fs.hpp"
#include "log.hpp"
#include <nvjpg.hpp>
#include <switch.h>
#include <vector>
#include <string>
@@ -272,6 +273,8 @@ public:
PLSR_PlayerSoundId m_sound_ids[SoundEffect_MAX]{};
nj::Decoder m_decoder;
private: // from nanovg decko3d example by adubbz
static constexpr unsigned NumFramebuffers = 2;
static constexpr unsigned StaticCmdSize = 0x1000;