Skip to content

Commit

Permalink
fix intial config parsing not setting target frametime
Browse files Browse the repository at this point in the history
  • Loading branch information
Kethen committed Apr 7, 2024
1 parent f4dac0f commit b051581
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions s4_league_fps_unlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,6 @@ struct config{
int framelimiter_busy_loop_buffer_100ns;
};

static uint32_t target_frametime_ns;
static uint32_t target_frametime_100ns;

static float frametime;
static uint64_t frametime_accumulated = 0;
static uint8_t weapon_slot;
Expand All @@ -130,6 +127,9 @@ struct config config = {
.framelimiter_busy_loop_buffer_100ns = 15000,
};

static uint32_t target_frametime_ns = (1 * 1000 * 1000 * 1000) / config.max_framerate;
static uint32_t target_frametime_100ns = target_frametime_ns / 100;

static void parse_config(){
const char *config_file_name = "s4_league_fps_unlock.json";
std::ifstream config_file(config_file_name);
Expand Down

0 comments on commit b051581

Please sign in to comment.