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():
|
def main():
|
||||||
print("launching please wait...")
|
print("launching please wait...")
|
||||||
|
|
||||||
os_services.init()
|
if not os_services.init():
|
||||||
|
print("platform not supported")
|
||||||
|
return
|
||||||
|
|
||||||
config.init()
|
config.init()
|
||||||
if not check_eula():
|
if not check_eula():
|
||||||
return
|
return
|
||||||
|
@ -44,6 +44,7 @@ def init():
|
|||||||
if monitor_rect is None or WindowServer.crop is None:
|
if monitor_rect is None or WindowServer.crop is None:
|
||||||
logging.error("Game window not found")
|
logging.error("Game window not found")
|
||||||
WindowServer.status = Status.CRASHED
|
WindowServer.status = Status.CRASHED
|
||||||
|
return
|
||||||
|
|
||||||
for i, m in enumerate(WindowServer.sct.monitors):
|
for i, m in enumerate(WindowServer.sct.monitors):
|
||||||
if m["top"] == monitor_rect[0] and m["left"] == monitor_rect[1]:
|
if m["top"] == monitor_rect[0] and m["left"] == monitor_rect[1]:
|
||||||
|
@ -7,6 +7,7 @@ from typing import Tuple, Optional
|
|||||||
import platform
|
import platform
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class IOSServices(ABC):
|
class IOSServices(ABC):
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
@ -46,7 +47,7 @@ class IOSServices(ABC):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
@abstractmethod
|
@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
|
:return: [top, left, height, width] of monitor which has game running in it
|
||||||
"""
|
"""
|
||||||
@ -83,13 +84,17 @@ class os_services:
|
|||||||
_instance: Optional[IOSServices] = None
|
_instance: Optional[IOSServices] = None
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def init():
|
def init() -> bool:
|
||||||
os_name = platform.system()
|
os_name = platform.system()
|
||||||
if os_name == "Windows":
|
if os_name == "Windows":
|
||||||
from fishy.osservices.windows import Windows
|
from fishy.osservices.windows import Windows
|
||||||
os_services._instance = Windows()
|
os_services._instance = Windows()
|
||||||
elif os_name == "Linux":
|
return True
|
||||||
from fishy.osservices.linux import Linux
|
|
||||||
os_services._instance = Linux()
|
# todo uncomment after linux.py is implemented
|
||||||
else:
|
# if os_name == "Linux":
|
||||||
logging.error("Platform not supported")
|
# from fishy.osservices.linux import Linux
|
||||||
|
# os_services._instance = Linux()
|
||||||
|
# return True
|
||||||
|
|
||||||
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user