ok-script 0.0.84__tar.gz → 0.0.85__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ok-script-0.0.84 → ok-script-0.0.85}/PKG-INFO +1 -1
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/capture/HwndWindow.py +11 -13
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/capture/adb/DeviceManager.py +7 -9
- {ok-script-0.0.84 → ok-script-0.0.85}/ok_script.egg-info/PKG-INFO +1 -1
- {ok-script-0.0.84 → ok-script-0.0.85}/setup.py +1 -1
- {ok-script-0.0.84 → ok-script-0.0.85}/README.md +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/OK.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/alas/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/alas/emulator_base.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/alas/emulator_windows.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/alas/platform_base.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/alas/platform_windows.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/alas/utils.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/capture/BaseCaptureMethod.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/capture/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/capture/adb/ADBCaptureMethod.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/capture/adb/WindowsCaptureFactory.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/capture/adb/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/capture/adb/bin/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/capture/image/ImageCaptureMethod.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/capture/image/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/capture/windows/BaseWindowsCaptureMethod.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/capture/windows/BitBltCaptureMethod.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/capture/windows/DesktopDuplicationCaptureMethod.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/capture/windows/WindowsGraphicsCaptureMethod.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/capture/windows/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/capture/windows/d3d11.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/capture/windows/dump.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/capture/windows/utils.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/capture/windows/window.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/color/Color.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/color/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/config/Config.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/config/InfoDict.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/config/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/feature/Box.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/feature/Feature.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/feature/FeatureSet.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/feature/FindFeature.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/feature/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/firebase/Analytics.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/firebase/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/App.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/Communicate.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/MainWindow.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/MessageWindow.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/StartController.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/TabTitles.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/about/AboutTab.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/about/HttpTextEdit.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/about/VersionCard.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/about/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/common/OKIcon.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/common/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/common/config.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/common/style_sheet.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/debug/AspectRatioWidget.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/debug/DebugTab.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/debug/FrameWidget.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/debug/InfoWidget.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/debug/LoggerWidget.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/debug/Screenshot.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/debug/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/i18n/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/i18n/path.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/i18n/update.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/icon/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/icon/icon.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/overlay/OverlayWindow.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/overlay/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/qss/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/resources.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/settings/SettingTab.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/settings/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/start/SelectCaptureListView.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/start/StartCard.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/start/StartTab.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/start/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/tasks/ConfigItemFactory.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/tasks/ConfigLabelAndWidget.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/tasks/LabelAndDoubleSpinBox.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/tasks/LabelAndDropDown.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/tasks/LabelAndLineEdit.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/tasks/LabelAndList.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/tasks/LabelAndSpinBox.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/tasks/LabelAndSwitchButton.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/tasks/LabelAndWidget.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/tasks/ModifyListDialog.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/tasks/ModifyListItem.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/tasks/OneTimeTaskTab.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/tasks/StartButton.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/tasks/TaskCard.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/tasks/TaskOpButton.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/tasks/TooltipTableWidget.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/tasks/TriggerTaskTab.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/tasks/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/util/Alert.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/util/InitWorker.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/util/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/widget/Card.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/widget/EmptyCard.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/widget/FramelessDialog.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/widget/ListTableWidgetItem.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/widget/NumericTableWidgetItem.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/widget/StartLoadingDialog.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/widget/StatusBar.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/widget/Tab.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/widget/TabWidget.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/widget/UpdateConfigWidgetItem.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/widget/YesNonWidgetItem.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/gui/widget/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/interaction/ADBInteraction.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/interaction/BaseInteraction.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/interaction/DoNothingInteraction.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/interaction/Win32Interaction.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/interaction/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/logging/Logger.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/logging/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/ocr/OCR.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/ocr/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/rotypes/Windows/Foundation/Collections.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/rotypes/Windows/Foundation/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/rotypes/Windows/Globalization/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/rotypes/Windows/Graphics/Capture/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/rotypes/Windows/Graphics/DirectX/Direct3D11/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/rotypes/Windows/Graphics/DirectX/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/rotypes/Windows/Graphics/Imaging/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/rotypes/Windows/Graphics/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/rotypes/Windows/Media/Ocr/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/rotypes/Windows/Media/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/rotypes/Windows/Security/Cryptography/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/rotypes/Windows/Security/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/rotypes/Windows/Storage/Streams/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/rotypes/Windows/Storage/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/rotypes/Windows/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/rotypes/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/rotypes/delegate.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/rotypes/export.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/rotypes/idldsl.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/rotypes/inspectable.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/rotypes/roapi.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/rotypes/types.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/rotypes/winstring.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/save/BlackBarProcessor.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/save/PostProcessor.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/save/SaveByInterval.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/save/SaveByKeyPress.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/save/SaveMethodBase.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/save/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/scene/FeatureScene.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/scene/Scene.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/scene/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/stats/StreamStats.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/stats/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/task/BaseTask.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/task/ExecutorOperation.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/task/OneTimeTask.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/task/TaskExecutor.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/task/TriggerTask.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/task/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/update/GithubMultiDownloader.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/update/Updater.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/update/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/update/gen_md5.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/util/Handler.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/util/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/util/exit_event.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/util/json.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/util/list.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/util/path.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/util/thread.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/util/win32_process.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok/util/yaml.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok_script.egg-info/SOURCES.txt +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok_script.egg-info/dependency_links.txt +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok_script.egg-info/requires.txt +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/ok_script.egg-info/top_level.txt +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/setup.cfg +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/tests/__init__.py +0 -0
- {ok-script-0.0.84 → ok-script-0.0.85}/tests/test_updater.py +0 -0
|
@@ -42,31 +42,23 @@ class HwndWindow:
|
|
|
42
42
|
real_x_offset = 0
|
|
43
43
|
real_y_offset = 0
|
|
44
44
|
|
|
45
|
-
def __init__(self, exit_event, title, exe_name=None, frame_width=0, frame_height=0):
|
|
45
|
+
def __init__(self, exit_event, title, exe_name=None, frame_width=0, frame_height=0, player_id=-1):
|
|
46
46
|
super().__init__()
|
|
47
47
|
self.app_exit_event = exit_event
|
|
48
48
|
self.exe_name = exe_name
|
|
49
49
|
self.title = title
|
|
50
50
|
self.stop_event = threading.Event()
|
|
51
51
|
self.visible = False
|
|
52
|
+
self.player_id = player_id
|
|
52
53
|
self.update_window(title, exe_name, frame_width, frame_height)
|
|
53
54
|
self.thread = threading.Thread(target=self.update_window_size, name="update_window_size")
|
|
54
55
|
self.thread.start()
|
|
55
56
|
|
|
56
|
-
def update_title_and_exe(self, title, exe):
|
|
57
|
-
self.title = title
|
|
58
|
-
self.exe_name = exe
|
|
59
|
-
self.hwnd = None
|
|
60
|
-
self.visible = False
|
|
61
|
-
self.exists = False
|
|
62
|
-
self.width = 0
|
|
63
|
-
self.height = 0
|
|
64
|
-
self.do_update_window_size()
|
|
65
|
-
|
|
66
57
|
def stop(self):
|
|
67
58
|
self.stop_event.set()
|
|
68
59
|
|
|
69
|
-
def update_window(self, title, exe_name, frame_width, frame_height):
|
|
60
|
+
def update_window(self, title, exe_name, frame_width, frame_height, player_id=-1):
|
|
61
|
+
self.player_id = player_id
|
|
70
62
|
self.title = title
|
|
71
63
|
self.exe_name = exe_name
|
|
72
64
|
self.update_frame_size(frame_width, frame_height)
|
|
@@ -100,7 +92,7 @@ class HwndWindow:
|
|
|
100
92
|
name, self.hwnd, self.exe_full_path, self.real_x_offset, self.real_y_offset, self.real_width, self.real_height = find_hwnd(
|
|
101
93
|
self.title,
|
|
102
94
|
self.exe_name,
|
|
103
|
-
self.frame_width, self.frame_height)
|
|
95
|
+
self.frame_width, self.frame_height, player_id=self.player_id)
|
|
104
96
|
self.exists = self.hwnd is not None
|
|
105
97
|
if self.hwnd is not None:
|
|
106
98
|
self.exists = win32gui.IsWindow(self.hwnd)
|
|
@@ -210,6 +202,12 @@ def get_player_id_from_cmdline(cmdline):
|
|
|
210
202
|
if i != 0:
|
|
211
203
|
if cmdline[i].isdigit():
|
|
212
204
|
return int(cmdline[i])
|
|
205
|
+
for i in range(len(cmdline)):
|
|
206
|
+
if i != 0:
|
|
207
|
+
value = re.search(r'index=(\d+)', cmdline[i])
|
|
208
|
+
# Return the value if it exists, otherwise return None
|
|
209
|
+
if value is not None:
|
|
210
|
+
return int(value.group(1))
|
|
213
211
|
return 0
|
|
214
212
|
|
|
215
213
|
|
|
@@ -101,9 +101,7 @@ class DeviceManager:
|
|
|
101
101
|
|
|
102
102
|
def do_refresh(self, current=False):
|
|
103
103
|
self.update_pc_device()
|
|
104
|
-
|
|
105
104
|
self.refresh_emulators(current)
|
|
106
|
-
|
|
107
105
|
self.refresh_phones(current)
|
|
108
106
|
|
|
109
107
|
if self.exit_event.is_set():
|
|
@@ -131,7 +129,7 @@ class DeviceManager:
|
|
|
131
129
|
width, height = self.get_resolution(adb_device)
|
|
132
130
|
logger.debug(f'refresh_phones found an phone {adb_device}')
|
|
133
131
|
phone_device = {"address": adb_device.serial, "device": "adb", "connected": True, "imei": imei,
|
|
134
|
-
"nick": adb_device.prop.model or imei,
|
|
132
|
+
"nick": adb_device.prop.model or imei, "player_id": -1,
|
|
135
133
|
"resolution": f'{width}x{height}'}
|
|
136
134
|
self.device_dict[imei] = phone_device
|
|
137
135
|
|
|
@@ -153,7 +151,7 @@ class DeviceManager:
|
|
|
153
151
|
connected = adb_device is not None and name is not None
|
|
154
152
|
emulator_device = {"address": emulator.serial, "device": "adb",
|
|
155
153
|
"full_path": emulator.path, "connected": connected,
|
|
156
|
-
"imei": emulator.name,
|
|
154
|
+
"imei": emulator.name, "player_id": emulator.player_id,
|
|
157
155
|
"nick": name or emulator.name, "emulator": emulator}
|
|
158
156
|
if adb_device is not None:
|
|
159
157
|
emulator_device["resolution"] = f"{width}x{height}"
|
|
@@ -236,11 +234,11 @@ class DeviceManager:
|
|
|
236
234
|
preferred = self.get_preferred_device()
|
|
237
235
|
return preferred.get('hwnd')
|
|
238
236
|
|
|
239
|
-
def ensure_hwnd(self, title, exe, frame_width=0, frame_height=0):
|
|
237
|
+
def ensure_hwnd(self, title, exe, frame_width=0, frame_height=0, player_id=-1):
|
|
240
238
|
if self.hwnd is None:
|
|
241
|
-
self.hwnd = HwndWindow(self.exit_event, title, exe, frame_width, frame_height)
|
|
239
|
+
self.hwnd = HwndWindow(self.exit_event, title, exe, frame_width, frame_height, player_id)
|
|
242
240
|
else:
|
|
243
|
-
self.hwnd.update_window(title, exe, frame_width, frame_height)
|
|
241
|
+
self.hwnd.update_window(title, exe, frame_width, frame_height, player_id)
|
|
244
242
|
|
|
245
243
|
def use_windows_capture(self, override_config=None, require_bg=False, use_bit_blt_only=False):
|
|
246
244
|
if not override_config:
|
|
@@ -271,7 +269,7 @@ class DeviceManager:
|
|
|
271
269
|
else:
|
|
272
270
|
width, height = self.get_resolution()
|
|
273
271
|
if self.config.get('capture') == "windows":
|
|
274
|
-
self.ensure_hwnd(None, preferred.get('full_path'), width, height)
|
|
272
|
+
self.ensure_hwnd(None, preferred.get('full_path'), width, height, preferred['player_id'])
|
|
275
273
|
self.use_windows_capture({'can_bit_blt': True}, require_bg=True, use_bit_blt_only=True)
|
|
276
274
|
else:
|
|
277
275
|
if not isinstance(self.capture_method, ADBCaptureMethod):
|
|
@@ -281,7 +279,7 @@ class DeviceManager:
|
|
|
281
279
|
self.capture_method = ADBCaptureMethod(self, self.exit_event, width=width,
|
|
282
280
|
height=height)
|
|
283
281
|
if self.debug and preferred.get('full_path'):
|
|
284
|
-
self.ensure_hwnd(None, preferred.get('full_path'), width, height)
|
|
282
|
+
self.ensure_hwnd(None, preferred.get('full_path'), width, height, preferred['player_id'])
|
|
285
283
|
elif self.hwnd is not None:
|
|
286
284
|
self.hwnd.stop()
|
|
287
285
|
self.hwnd = None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ok-script-0.0.84 → ok-script-0.0.85}/ok/rotypes/Windows/Graphics/DirectX/Direct3D11/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|