Skip to content

Commit 9b5a158

Browse files
committed
split cam merge
1 parent 4e89cf1 commit 9b5a158

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ This program can be used to automatically start, split, and reset your preferred
6262

6363
#### Avg. FPS
6464

65-
- Calculates the average comparison rate of the capture region to split images. This value will likely be much higher than needed (unless you [Force Full-Content-Rendering](#Full-Content-Rendering)), so it is highly recommended to limit your FPS depending on the frame rate of the game you are capturing.
65+
- Calculates the average comparison rate of the capture region to split images. This value will likely be much higher than needed, so it is highly recommended to limit your FPS depending on the frame rate of the game you are capturing.
6666

6767
### Settings
6868

@@ -73,7 +73,7 @@ This program can be used to automatically start, split, and reset your preferred
7373
- Histograms: An explanation on Histograms comparison can be found [here](https://mpatacchiola.github.io/blog/2016/11/12/the-simplest-classifier-histogram-intersection.html). This is a great method to use if you are using several masked images.
7474
- Perceptual Hash: An explanation on pHash comparison can be found [here](http://www.hackerfactor.com/blog/index.php?/archives/432-Looks-Like-It.html). It is highly recommended to NOT use pHash if you use masked images. It is very inaccurate.
7575

76-
#### Capture Method & Capture Device
76+
#### Capture Method
7777

7878
- **BitBlt** (fastest, least compatible)
7979
A good default fast option. But it cannot properly record OpenGL, Hardware Accelerated or Exclusive Fullscreen windows.

src/menu_bar.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,9 @@ def hotkey_connect(hotkey: Hotkeys):
247247
self.live_capture_region_checkbox.setChecked(autosplit.settings_dict["live_capture_region"])
248248
self.capture_method_combobox.setCurrentIndex(
249249
get_capture_method_index(autosplit.settings_dict["capture_method"]))
250+
self.capture_device_combobox.currentIndexChanged.connect(lambda: self.__set_value(
251+
"capture_device_id",
252+
self.__capture_device_changed()))
250253

251254
# Image Settings
252255
self.default_comparison_method.setCurrentIndex(autosplit.settings_dict["default_comparison_method"])

src/region_capture.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,15 @@ def __bit_blt_capture(hwnd: int, selection: Region, render_full_content: bool =
8080
win32con.SRCCOPY)
8181
image = np.frombuffer(cast(bytes, bitmap.GetBitmapBits(True)), dtype=np.uint8)
8282
image.shape = (selection["height"], selection["width"], 4)
83-
# https://github.com/kaluluosi/pywin32-stubs/issues/5
84-
except (win32ui.error, pywintypes.error): # pyright: ignore [reportGeneralTypeIssues] pylint: disable=no-member
83+
except (win32ui.error, pywintypes.error):
8584
return None
8685
# We already obtained the image, so we can ignore errors during cleanup
8786
try:
8887
dc_object.DeleteDC()
8988
compatible_dc.DeleteDC()
9089
win32gui.ReleaseDC(hwnd, window_dc)
9190
win32gui.DeleteObject(bitmap.GetHandle())
92-
# https://github.com/kaluluosi/pywin32-stubs/issues/5
93-
except win32ui.error: # pyright: ignore [reportGeneralTypeIssues]
91+
except win32ui.error:
9492
pass
9593
return image
9694

0 commit comments

Comments
 (0)