Skip to content

Commit

Permalink
Merge pull request #82 from ag-advania/Zection_dev_noTouchPlz
Browse files Browse the repository at this point in the history
Zection dev no touch plz
  • Loading branch information
Zection6V authored Dec 12, 2024
2 parents 168bbb8 + 0ae2c0e commit 437c82b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/frontend/qt_sdl/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ DefaultList<int> DefaultInts =
{"Instance*.Window*.Width", 256},
{"Instance*.Window*.Height", 384},
{"Screen.VSyncInterval", 1},
{"3D.Renderer", renderer3D_Software}, // melonPrimeDS. renderer3D_Software renderer3D_OpenGL renderer3D_OpenGLCompute:
{"3D.Renderer", renderer3D_OpenGLCompute}, // melonPrimeDS. renderer3D_Software renderer3D_OpenGL renderer3D_OpenGLCompute:
{"3D.GL.ScaleFactor", 4}, // melonPrimeDS. 8 is too much 4 is enough
#ifdef JIT_ENABLED
{"JIT.MaxBlockSize", 32},
Expand Down
14 changes: 14 additions & 0 deletions src/frontend/qt_sdl/EmuThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,7 @@ void EmuThread::run()

// MelonPrimeDS Functions START

emuInstance->setVSyncGL(false); // MelonPrimeDS VsyncAlwaysOff

// auto isFocused = emuInstance->getMainWindow()->panel->getFocused();
bool isFocused = emuInstance->getMainWindow()->panel->getFocused();
Expand All @@ -1118,6 +1119,10 @@ void EmuThread::run()
// Set the initialization complete flag
hasInitialized = true;

// updateRenderer
videoRenderer = emuInstance->getGlobalConfig().GetInt("3D.Renderer");
updateRenderer();

// Hide cursor
showCursorOnMelonPrimeDS(false);

Expand Down Expand Up @@ -1660,6 +1665,9 @@ void EmuThread::run()
showCursorOnMelonPrimeDS(true);
}

videoRenderer = renderer3D_Software;
updateRenderer();

if (emuInstance->isTouching) {
emuInstance->nds->TouchScreen(emuInstance->touchX, emuInstance->touchY);
}
Expand Down Expand Up @@ -1762,6 +1770,12 @@ void EmuThread::handleMessages()
emuInstance->audioEnable();
emit windowEmuPause(false);
emuInstance->osdAddMessage(0, "Resumed");

// MelonPrimeDS {
// applyVideoSettings Immediately when resumed
videoRenderer = emuInstance->getGlobalConfig().GetInt("3D.Renderer");
updateRenderer();
// MelonPrimeDS }
}
break;

Expand Down
31 changes: 11 additions & 20 deletions src/frontend/qt_sdl/InputConfig/InputConfigDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -2335,16 +2335,15 @@
</widget>
</item>

<item row="3" column="0">
<!-- Label for metroidSetVideoQuality -->
<widget class="QLabel" name="metroidSetVideoQualityLabel">
<property name="text">
<string>Restarting melonPrimeDS required:</string>
</property>
</widget>
</item>


<!-- SnapTap -->
<item row="3" column="0">
<widget class="QCheckBox" name="cbMetroidEnableSnapTap">
<property name="text">
<string>Enable SnapTap (Faster directional switching for smooth strafing)</string>
</property>
</widget>
</item>

<!-- Low quality -->
<item row="4" column="0">
<widget class="QPushButton" name="metroidSetVideoQualityToLow">
Expand All @@ -2358,7 +2357,7 @@
<item row="5" column="0">
<widget class="QPushButton" name="metroidSetVideoQualityToHigh">
<property name="text">
<string>Video quality: High (Excellent in-game graphics, but menus flicker)</string>
<string>Video quality: High (Lower Performance, Menu flickering)</string>
</property>
</widget>
</item>
Expand All @@ -2367,19 +2366,11 @@
<item row="6" column="0">
<widget class="QPushButton" name="metroidSetVideoQualityToHigh2">
<property name="text">
<string>Video quality: High2 (Excellent in-game graphics, but menus flicker) (Fast but unstable)</string>
<string>Video quality: High2 (Recommended. Best Performance, Menu flickering, Minor Visual Glitches) </string>
</property>
</widget>
</item>

<!-- SnapTap -->
<item row="7" column="0">
<widget class="QCheckBox" name="cbMetroidEnableSnapTap">
<property name="text">
<string>Enable SnapTap</string>
</property>
</widget>
</item>

</layout>
</widget>
Expand Down

0 comments on commit 437c82b

Please sign in to comment.