Skip to content

Commit b469383

Browse files
committed
update
1 parent c30b377 commit b469383

3 files changed

Lines changed: 22 additions & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
9090
# Cache the vcpkg binary cache (compiled .zip archives)
9191
- name: Cache vcpkg binaries
92-
uses: actions/cache@v4
92+
uses: actions/cache@v5.0.4
9393
with:
9494
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
9595
key: vcpkg-opencv-core-imgproc-highgui-x64-static-v1
@@ -98,7 +98,7 @@ jobs:
9898
# Cache the vcpkg installed tree — skip the install step entirely on hit
9999
- name: Cache vcpkg installed
100100
id: vcpkg-installed
101-
uses: actions/cache@v4
101+
uses: actions/cache@v5.0.4
102102
with:
103103
path: ${{ env.VCPKG_INSTALLATION_ROOT }}\installed
104104
key: vcpkg-installed-opencv-core-imgproc-highgui-x64-static-v1
@@ -112,7 +112,7 @@ jobs:
112112

113113
# Cache FetchContent downloads (nlohmann_json tarball)
114114
- name: Cache FetchContent
115-
uses: actions/cache@v4
115+
uses: actions/cache@v5.0.4
116116
with:
117117
path: ${{ env.FETCHCONTENT_BASE_DIR }}
118118
key: fetchcontent-${{ hashFiles('**/CMakeLists.txt') }}

includes/config.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,26 @@ static std::string config_path()
3030

3131
struct Config
3232
{
33-
std::string window = "Sober";
33+
std::string window = "Roblox";
3434
std::string color = "#ffffb3"; // rrggbb hex — matched in BGR space
3535
int fov = 350;
3636
double tolerance = 25.0; // BGR per-channel ± tolerance [0, 255]
3737
int min_area = 15;
3838
int max_area = 9999;
39-
double lead = 0.8;
39+
double lead = 1.0;
4040
double smoothness = 0.1;
4141
double min_strength = 0.033;
4242
double max_strength = 0.1;
4343
double offset_x = 0.0;
4444
double offset_y = 0.25;
4545
std::string trigger = "right"; // "left", "right", or "both"
4646
int target_fps = 120; // capture loop FPS cap; 0 = unlimited
47-
bool triggerbot = true; // auto-click when on target
47+
bool triggerbot = false; // auto-click when on target
4848
double trigger_dist = 10.0; // px distance to crosshair that fires click
49-
int trigger_delay = 500; // ms between triggerbot clicks
49+
int trigger_delay = 250; // ms between triggerbot clicks
5050
int lost_frames_thresh = 4; // frames without target before history reset
5151
bool debug = true;
52-
bool enabled = true;
52+
bool enabled = false;
5353

5454
// ── Color helpers ─────────────────────────────────────────────────────────
5555
// All matching is done in BGR space — same channel order OpenCV uses for

src/main.cpp

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,17 @@
3232
// ─────────────────────────────────────────────────────────────────────────────
3333

3434
static std::atomic<bool> g_running{true};
35-
static std::atomic<bool> g_reload{false}; // set by SIGHUP
35+
static std::atomic<bool> g_reload{false}; // set by SIGHUP (Linux only)
3636

3737
static void on_sigint(int)
3838
{
3939
std::cout << "\n[exit] SIGINT\n";
4040
g_running.store(false);
4141
}
42+
43+
#if !defined(_WIN32)
4244
static void on_sighup(int) { g_reload.store(true); }
45+
#endif
4346

4447
// ─────────────────────────────────────────────────────────────────────────────
4548
// Hotkey thread
@@ -131,7 +134,7 @@ static std::string find_keyboard()
131134

132135
bool has_f1 = (key_bits[KEY_F1 / 8] >> (KEY_F1 % 8)) & 1;
133136
bool has_a = (key_bits[KEY_A / 8] >> (KEY_A % 8)) & 1;
134-
bool has_rep = (ev_bits[EV_REP / 8] >> (EV_REP % 8)) & 1; // ← fixed
137+
bool has_rep = (ev_bits[EV_REP / 8] >> (EV_REP % 8)) & 1;
135138

136139
std::string lo(name);
137140
std::transform(lo.begin(), lo.end(), lo.begin(), ::tolower);
@@ -344,7 +347,10 @@ static void print_config(const Config &cfg)
344347
<< " tracking : lost_thresh=" << cfg.lost_frames_thresh << '\n'
345348
<< " debug : " << (cfg.debug ? "true" : "false") << '\n'
346349
<< "\n F1=exit F2=toggle aim F3=toggle debug F4=toggle triggerbot\n"
347-
<< " kill -HUP <pid> to hot-reload config.json\n\n";
350+
#if !defined(_WIN32)
351+
<< " kill -HUP <pid> to hot-reload config.json\n"
352+
#endif
353+
<< "\n";
348354
}
349355

350356
// ─────────────────────────────────────────────────────────────────────────────
@@ -354,7 +360,9 @@ static void print_config(const Config &cfg)
354360
int main()
355361
{
356362
std::signal(SIGINT, on_sigint);
363+
#if !defined(_WIN32)
357364
std::signal(SIGHUP, on_sighup); // kill -HUP <pid> → hot-reload config
365+
#endif
358366

359367
Config cfg;
360368
try
@@ -418,12 +426,13 @@ int main()
418426

419427
// ── Main thread: debug display + SIGHUP hot-reload ────────────────────────
420428
// disp is declared once outside the loop so the buffer is reused every
421-
// frame (copyTo in DisplayFrame won't alloc as long as dims stay the same)
429+
// frame (copyTo won't alloc as long as dims stay the same)
422430
DisplayFrame df;
423431
cv::Mat disp;
424432

425433
while (g_running.load())
426434
{
435+
#if !defined(_WIN32)
427436
// ── SIGHUP config hot-reload ──────────────────────────────────────
428437
// Reloads config.json at runtime — no restart needed when tweaking
429438
// tolerance, fov, smoothness, etc. CaptureThread and AimThread hold
@@ -444,6 +453,7 @@ int main()
444453
std::cerr << "[config] Reload failed: " << e.what() << '\n';
445454
}
446455
}
456+
#endif
447457

448458
if (!debug.load())
449459
{

0 commit comments

Comments
 (0)