win32 compatibility
This commit is contained in:
parent
6cf1ebcb26
commit
bd3cf90791
|
@ -16,7 +16,8 @@ Optional:
|
|||
|
||||
Supported platform:
|
||||
- linux
|
||||
- (others need to test: such as win32, cygwin, darwin, bsd, ...)
|
||||
- win32
|
||||
- (others need to test: such as cygwin, darwin, bsd, ...)
|
||||
|
||||
Feature:
|
||||
- | configurable full keyboard control
|
||||
|
|
|
@ -25,7 +25,7 @@ version_info=(0,0,0)
|
|||
required_pyver=(3,11,0)
|
||||
|
||||
# TODO: test on different platform
|
||||
supported_platform=('linux',)
|
||||
supported_platform=('linux','win32')
|
||||
|
||||
# for SDL 2.26.0
|
||||
required_pysdl2ver=(0,9,15)
|
||||
|
|
|
@ -15,7 +15,12 @@
|
|||
|
||||
from _thread import allocate_lock
|
||||
from functools import partial
|
||||
from signal import SIG_IGN,SIGINT,SIGTERM,SIGUSR1,SIGUSR2,signal,strsignal
|
||||
from signal import SIG_IGN,SIGINT,SIGTERM,signal,strsignal
|
||||
|
||||
try:
|
||||
from signal import SIG_IGN,SIGINT,SIGTERM,SIGUSR1,SIGUSR2,signal,strsignal
|
||||
except ImportError:
|
||||
SIGUSR1=SIGUSR2=None
|
||||
|
||||
from .co import AttrDict
|
||||
from .config import *
|
||||
|
@ -89,8 +94,9 @@ def mainloop(*,images=(),containers=()):
|
|||
handler=partial(signal_close,ui=ui)
|
||||
signal(SIGINT,handler)
|
||||
signal(SIGTERM,handler)
|
||||
signal(SIGUSR1,handler)
|
||||
signal(SIGUSR2,handler)
|
||||
if SIGUSR1 is not None:
|
||||
signal(SIGUSR1,handler)
|
||||
signal(SIGUSR2,handler)
|
||||
|
||||
if images:
|
||||
command_listed(images,ui)
|
||||
|
|
Loading…
Reference in New Issue