mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-13 07:32:23 -07:00
always-refresh dev option
This commit is contained in:
@@ -65,6 +65,7 @@ D_CmdTable: // | | | |
|
||||
@table(name)
|
||||
D_DevToggleTable:
|
||||
{
|
||||
{always_refresh}
|
||||
{simulate_lag}
|
||||
{draw_ui_text_pos}
|
||||
{draw_ui_focus_debug}
|
||||
|
||||
@@ -44,6 +44,7 @@ D_CmdKind_Attach,
|
||||
D_CmdKind_COUNT,
|
||||
} D_CmdKind;
|
||||
|
||||
global B32 DEV_always_refresh = 0;
|
||||
global B32 DEV_simulate_lag = 0;
|
||||
global B32 DEV_draw_ui_text_pos = 0;
|
||||
global B32 DEV_draw_ui_focus_debug = 0;
|
||||
@@ -54,6 +55,7 @@ global B32 DEV_cmd_context_tooltips = 0;
|
||||
global B32 DEV_updating_indicator = 0;
|
||||
struct {B32 *value_ptr; String8 name;} DEV_toggle_table[] =
|
||||
{
|
||||
{&DEV_always_refresh, str8_lit_comp("always_refresh")},
|
||||
{&DEV_simulate_lag, str8_lit_comp("simulate_lag")},
|
||||
{&DEV_draw_ui_text_pos, str8_lit_comp("draw_ui_text_pos")},
|
||||
{&DEV_draw_ui_focus_debug, str8_lit_comp("draw_ui_focus_debug")},
|
||||
|
||||
@@ -2324,7 +2324,7 @@ dw_read_line_file(String8 data,
|
||||
DW_LNCT lnct = enc_arr[enc_idx*2 + 0];
|
||||
DW_FormKind form_kind = enc_arr[enc_idx*2 + 1];
|
||||
DW_Form form = {0};
|
||||
U64 bytes_read;
|
||||
U64 bytes_read = 0;
|
||||
switch (lnct) {
|
||||
case DW_LNCT_Path: {
|
||||
bytes_read = dw_read_form(data, cursor, version, format, address_size, form_kind, max_U64, &form);
|
||||
|
||||
@@ -11294,7 +11294,7 @@ rd_frame(void)
|
||||
OS_EventList events = {0};
|
||||
if(rd_state->frame_depth == 1)
|
||||
{
|
||||
events = os_get_events(scratch.arena, rd_state->num_frames_requested == 0);
|
||||
events = os_get_events(scratch.arena, rd_state->num_frames_requested == 0 && !DEV_always_refresh);
|
||||
}
|
||||
|
||||
//////////////////////////////
|
||||
@@ -11333,7 +11333,7 @@ rd_frame(void)
|
||||
F32 target_hz = os_get_gfx_info()->default_refresh_rate;
|
||||
if(rd_state->frame_index > 32)
|
||||
{
|
||||
F32 possible_alternate_hz_targets[] = {target_hz, 60.f, 120.f, 144.f, 240.f};
|
||||
F32 possible_alternate_hz_targets[] = {target_hz, 60.f, 75.f, 120.f, 144.f, 165.f, 240.f, 360.f};
|
||||
F32 best_target_hz = target_hz;
|
||||
S64 best_target_hz_frame_time_us_diff = max_S64;
|
||||
for(U64 idx = 0; idx < ArrayCount(possible_alternate_hz_targets); idx += 1)
|
||||
|
||||
Reference in New Issue
Block a user