mirror of https://github.com/mgba-emu/mgba.git
3DS: Minor fixes for GPU issues, detect usable cores better
This commit is contained in:
parent
a14126c977
commit
41f27bf617
|
@ -227,7 +227,9 @@ static void _postAudioBuffer(struct mAVStream* stream, blip_t* left, blip_t* rig
|
|||
|
||||
static void _drawStart(void) {
|
||||
C3D_FrameBegin(frameLimiter ? 0 : C3D_FRAME_NONBLOCK);
|
||||
frameCounter = C3D_FrameCounter(0);
|
||||
// Mark both buffers used to make sure they get cleared
|
||||
C3D_FrameDrawOn(topScreen[doubleBuffer]);
|
||||
C3D_FrameDrawOn(bottomScreen[doubleBuffer]);
|
||||
}
|
||||
|
||||
static void _drawEnd(void) {
|
||||
|
@ -284,9 +286,8 @@ static void _resetCamera(struct m3DSImageSource* imageSource) {
|
|||
}
|
||||
|
||||
static void _setup(struct mGUIRunner* runner) {
|
||||
bool isNew3DS = false;
|
||||
APT_CheckNew3DS(&isNew3DS);
|
||||
if (isNew3DS && !envIsHomebrew()) {
|
||||
uint8_t mask;
|
||||
if (R_SUCCEEDED(svcGetProcessAffinityMask(&mask, CUR_PROCESS_HANDLE, 4)) && mask >= 4) {
|
||||
mCoreConfigSetDefaultIntValue(&runner->config, "threadedVideo", 1);
|
||||
mCoreLoadForeignConfig(runner->core, &runner->config);
|
||||
}
|
||||
|
@ -441,6 +442,11 @@ static void _gameUnloaded(struct mGUIRunner* runner) {
|
|||
}
|
||||
}
|
||||
|
||||
static void _storeCounter(struct mGUIRunner* runner) {
|
||||
UNUSED(runner);
|
||||
frameCounter = C3D_FrameCounter(0);
|
||||
}
|
||||
|
||||
static void _drawTex(struct mCore* core, bool faded) {
|
||||
unsigned screen_w, screen_h;
|
||||
switch (screenMode) {
|
||||
|
@ -989,7 +995,7 @@ int main() {
|
|||
.teardown = 0,
|
||||
.gameLoaded = _gameLoaded,
|
||||
.gameUnloaded = _gameUnloaded,
|
||||
.prepareForFrame = 0,
|
||||
.prepareForFrame = _storeCounter,
|
||||
.drawFrame = _drawFrame,
|
||||
.drawScreenshot = _drawScreenshot,
|
||||
.paused = _gameUnloaded,
|
||||
|
|
Loading…
Reference in New Issue