diff --git a/src/m64py/core/defs.py b/src/m64py/core/defs.py index 0ce59a0..73f6969 100644 --- a/src/m64py/core/defs.py +++ b/src/m64py/core/defs.py @@ -165,6 +165,14 @@ PLUGIN_NAME = { } PLUGIN_DEFAULT = { + M64PLUGIN_NULL: "NULL", + M64PLUGIN_RSP: "mupen64plus-rsp-hle%s" % DLL_EXT, + M64PLUGIN_GFX: "mupen64plus-video-GLideN64%s" % DLL_EXT, + M64PLUGIN_AUDIO: "mupen64plus-audio-sdl%s" % DLL_EXT, + M64PLUGIN_INPUT: "mupen64plus-input-sdl%s" % DLL_EXT +} + +PLUGIN_FALLBACK = { M64PLUGIN_NULL: "NULL", M64PLUGIN_RSP: "mupen64plus-rsp-hle%s" % DLL_EXT, M64PLUGIN_GFX: "mupen64plus-video-rice%s" % DLL_EXT, diff --git a/src/m64py/frontend/cheat.py b/src/m64py/frontend/cheat.py index 5a47f00..91faaff 100644 --- a/src/m64py/frontend/cheat.py +++ b/src/m64py/frontend/cheat.py @@ -123,8 +123,8 @@ class Cheat(QDialog, Ui_CheatDialog): cd, address, value, choices = cheat if choices: choices = Choices(self, name, choices) - rval = choices.exec_() - if rval == QDialog.Accepted: + rval = choices.exec() + if rval == QDialog.DialogCode.Accepted: curr_item = choices.listWidget.currentItem() value = curr_item.data(Qt.ItemDataRole.UserRole) else: diff --git a/src/m64py/frontend/settings.py b/src/m64py/frontend/settings.py index 6328a47..08dab66 100644 --- a/src/m64py/frontend/settings.py +++ b/src/m64py/frontend/settings.py @@ -167,17 +167,17 @@ class Settings(QDialog, Ui_Settings): def get_size_safe(self): try: - size = self.qset.value("size", SIZE_1X) + size = self.qset.value("size", SIZE_2X) except TypeError: - size = SIZE_1X + size = SIZE_2X if not type(size) == tuple: - size = SIZE_1X + size = SIZE_2X if len(size) != 2: - size = SIZE_1X + size = SIZE_2X if type(size[0]) != int or type(size[1]) != int: - size = SIZE_1X + size = SIZE_2X if size[0] <= 0 or size[1] <= 0: - size = SIZE_1X + size = SIZE_2X return size def get_parameter_help_safe(self, parameter): @@ -293,6 +293,10 @@ class Settings(QDialog, Ui_Settings): current = self.qset.value("Plugins/%s" % ( PLUGIN_NAME[plugin_type]), PLUGIN_DEFAULT[plugin_type]) index = combo.findText(current) + if index == -1: + current = self.qset.value("Plugins/%s" % ( + PLUGIN_NAME[plugin_type]), PLUGIN_FALLBACK[plugin_type]) + index = combo.findText(current) if index == -1: index = 0 combo.setCurrentIndex(index) diff --git a/src/m64py/platform.py b/src/m64py/platform.py index 8c31936..4626aad 100644 --- a/src/m64py/platform.py +++ b/src/m64py/platform.py @@ -14,7 +14,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -import os import sys if sys.platform.startswith("linux"):