Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion nitrogen/game_env.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import time
import platform
import ctypes

import pyautogui
import dxcam
Expand All @@ -21,6 +22,10 @@
import win32api
import win32con

try:
ctypes.windll.shcore.SetProcessDpiAwareness(1)
except Exception:
ctypes.windll.user32.SetProcessDPIAware()

def get_process_info(process_name):
"""
Expand Down Expand Up @@ -468,7 +473,7 @@ def __init__(

self.game_window.activate()
l, t, r, b = self.game_window.left, self.game_window.top, self.game_window.right, self.game_window.bottom
self.bbox = (l, t, r - l, b - t)
self.bbox = (l, t, r, b)

# Initialize speedhack client if using DLL injection
self.speedhack_client = xsh.Client(process_id=self.game_pid, arch=self.game_arch)
Expand Down