mirror of
https://github.com/mupen64plus/mupen64plus-ui-python.git
synced 2025-04-02 10:51:53 -04:00
don't import all from SDL
This commit is contained in:
parent
b15f0859ab
commit
ff4eb4e9e5
1 changed files with 3 additions and 2 deletions
|
@ -27,9 +27,9 @@ from m64py.frontend.keymap import QT2SDL, SCANCODE2KEYCODE, KEYCODE2SCANCODE
|
|||
from m64py.ui.input_ui import Ui_InputDialog
|
||||
|
||||
if SDL2:
|
||||
from m64py.SDL2 import *
|
||||
from m64py.SDL2 import SDL_WasInit, SDL_InitSubSystem, SDL_QuitSubSystem, SDL_INIT_VIDEO
|
||||
else:
|
||||
from m64py.SDL import *
|
||||
from m64py.SDL import SDL_WasInit, SDL_InitSubSystem, SDL_QuitSubSystem, SDL_INIT_VIDEO
|
||||
|
||||
KEY_RE = re.compile("([a-z]+)\((.*)\)")
|
||||
AXIS_RE = re.compile("([a-z]+)\((.*?),(.*?)\)")
|
||||
|
@ -385,6 +385,7 @@ class Input(QDialog, Ui_InputDialog):
|
|||
except:
|
||||
return "Select..."
|
||||
else:
|
||||
from m64py.SDL.keyboard import SDL_GetKeyName
|
||||
text = SDL_GetKeyName(int(sdl_key)).title()
|
||||
if not text:
|
||||
return "Select..."
|
||||
|
|
Loading…
Add table
Reference in a new issue