all repos — mgba @ da8fee9da163401fc82ff00bf6f9da7a1c181d45

mGBA Game Boy Advance Emulator

3DS: Ensure core 2 can be used for threaded renderer (fixes #1371)
Vicki Pfau vi@endrift.com
Sat, 30 Mar 2019 23:33:26 -0700
commit

da8fee9da163401fc82ff00bf6f9da7a1c181d45

parent

62aa70cca800bf8f320980b1f71947973d08ec3a

2 files changed, 13 insertions(+), 3 deletions(-)

jump to
M CHANGESCHANGES

@@ -26,6 +26,7 @@ - Qt: Fix overrides getting discarded (fixes mgba.io/i/1354)

- Qt: Fix saved scale not getting set on resize (fixes mgba.io/i/1074) - CMake: Fix .deb imagemagick dependencies - Qt: Fix crash in sprite viewer magnification (fixes mgba.io/i/1362) + - 3DS: Ensure core 2 can be used for threaded renderer (fixes mgba.io/i/1371) Misc: - GBA Savedata: EEPROM performance fixes - GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash
M src/platform/3ds/main.csrc/platform/3ds/main.c

@@ -104,6 +104,7 @@ static C3D_RenderTarget* upscaleBuffer;

static C3D_Tex upscaleBufferTex; static aptHookCookie cookie; +static bool core2; extern bool allocateRomBuffer(void);

@@ -258,9 +259,7 @@ CAMU_SetAutoWhiteBalance(imageSource->cam, false);

} static void _setup(struct mGUIRunner* runner) { - bool n3ds = false; - APT_CheckNew3DS(&n3ds); - if (n3ds) { + if (core2) { mCoreConfigSetDefaultIntValue(&runner->config, "threadedVideo", 1); mCoreLoadForeignConfig(runner->core, &runner->config); }

@@ -752,6 +751,10 @@ ndspChnWaveBufAdd(0, &dspBuffer[bufferId]);

} } +THREAD_ENTRY _core2Test(void* context) { + UNUSED(context); +} + int main() { rotation.d.sample = _sampleRotation; rotation.d.readTiltX = _readTiltX;

@@ -951,6 +954,12 @@ ConditionInit(&runner.autosave.cond);

APT_SetAppCpuTimeLimit(20); runner.autosave.thread = threadCreate(mGUIAutosaveThread, &runner.autosave, 0x4000, 0x1F, 1, true); + + Thread thread2; + if (ThreadCreate(&thread2, _core2Test, NULL) == 0) { + core2 = true; + ThreadJoin(thread2); + } mGUIInit(&runner, "3ds");