3DS: Ensure core 2 can be used for threaded renderer (fixes #1371)

This commit is contained in:
Vicki Pfau 2019-03-30 23:33:26 -07:00
parent 111688344d
commit 0fb69126a5
2 changed files with 13 additions and 3 deletions

View File

@ -13,6 +13,7 @@ Other fixes:
- 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:
- Qt: Add missing HEVC NVENC option (fixes mgba.io/i/1323)
- Qt: Improve camera initialization

View File

@ -103,6 +103,7 @@ static C3D_RenderTarget* upscaleBuffer;
static C3D_Tex upscaleBufferTex;
static aptHookCookie cookie;
static bool core2;
extern bool allocateRomBuffer(void);
@ -252,9 +253,7 @@ static void _resetCamera(struct m3DSImageSource* imageSource) {
}
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);
}
@ -746,6 +745,10 @@ static void _postAudioBuffer(struct mAVStream* stream, blip_t* left, blip_t* rig
}
}
THREAD_ENTRY _core2Test(void* context) {
UNUSED(context);
}
int main() {
rotation.d.sample = _sampleRotation;
rotation.d.readTiltX = _readTiltX;
@ -946,6 +949,12 @@ int main() {
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");
_map3DSKey(&runner.params.keyMap, KEY_X, GUI_INPUT_CANCEL);