mirror of
https://github.com/fishyboteso/fishyboteso.git
synced 2024-08-30 18:32:13 +00:00
removed Linux temprorily until linux.py is implemented
This commit is contained in:
parent
901ce6c346
commit
47c0ce7413
@ -42,7 +42,10 @@ def initialize():
|
||||
def main():
|
||||
print("launching please wait...")
|
||||
|
||||
os_services.init()
|
||||
if not os_services.init():
|
||||
print("platform not supported")
|
||||
return
|
||||
|
||||
config.init()
|
||||
if not check_eula():
|
||||
return
|
||||
|
@ -44,6 +44,7 @@ def init():
|
||||
if monitor_rect is None or WindowServer.crop is None:
|
||||
logging.error("Game window not found")
|
||||
WindowServer.status = Status.CRASHED
|
||||
return
|
||||
|
||||
for i, m in enumerate(WindowServer.sct.monitors):
|
||||
if m["top"] == monitor_rect[0] and m["left"] == monitor_rect[1]:
|
||||
|
@ -7,6 +7,7 @@ from typing import Tuple, Optional
|
||||
import platform
|
||||
|
||||
|
||||
|
||||
class IOSServices(ABC):
|
||||
|
||||
@abstractmethod
|
||||
@ -46,7 +47,7 @@ class IOSServices(ABC):
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
def get_monitor_rect(self):
|
||||
def get_monitor_rect(self) -> Optional[Tuple[int, int]]:
|
||||
"""
|
||||
:return: [top, left, height, width] of monitor which has game running in it
|
||||
"""
|
||||
@ -83,13 +84,17 @@ class os_services:
|
||||
_instance: Optional[IOSServices] = None
|
||||
|
||||
@staticmethod
|
||||
def init():
|
||||
def init() -> bool:
|
||||
os_name = platform.system()
|
||||
if os_name == "Windows":
|
||||
from fishy.osservices.windows import Windows
|
||||
os_services._instance = Windows()
|
||||
elif os_name == "Linux":
|
||||
from fishy.osservices.linux import Linux
|
||||
os_services._instance = Linux()
|
||||
else:
|
||||
logging.error("Platform not supported")
|
||||
return True
|
||||
|
||||
# todo uncomment after linux.py is implemented
|
||||
# if os_name == "Linux":
|
||||
# from fishy.osservices.linux import Linux
|
||||
# os_services._instance = Linux()
|
||||
# return True
|
||||
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user