Merge pull request #61 from alexhenrie/master

fix QKeySequence crash
This commit is contained in:
Milan Nikolic 2015-10-23 07:26:23 +02:00
commit 3a2a39fba7

View file

@ -17,6 +17,7 @@
import re
from PyQt5.QtWidgets import QDialog
from PyQt5.QtGui import QKeySequence
from m64py.opts import SDL2
from m64py.core.defs import *
@ -417,7 +418,7 @@ class Input(QDialog, Ui_InputDialog):
return SCANCODE2KEYCODE[SDL_GetScancodeFromName(text)]
else:
try:
key = QKeySequence(text).__int__()
key = QKeySequence(text)[0]
return QT2SDL[key]
except KeyError:
return None