Skip to content

Commit 6a7dd33

Browse files
committed
d3d11 debug layer exceptions; decimal enum displays; local time display in filesystem lister
1 parent f48d843 commit 6a7dd33

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

src/ctrl/ctrl.mdesk

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ CTRL_ExceptionCodeKindTable:
4343
{Win32ProcedureNotFound win32_procedure_not_found 0xc06d007f 0 "(Win32) Procedure Not Found" }
4444
{Win32SanitizerErrorDetected win32_sanitizer_error_detected 0xe073616e 1 "(Win32) Sanitizer Error Detected" }
4545
{Win32SanitizerRawAccessViolation win32_sanitizer_raw_access_violation 0xe0736171 0 "(Win32) Sanitizer Raw Access Violation" }
46+
{Win32DirectXDebugLayer win32_directx_debug_layer 0x0000087a 1 "(Win32) DirectX Debug Layer" }
4647
}
4748

4849
////////////////////////////////

src/ctrl/generated/ctrl.meta.h

+5
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ CTRL_ExceptionCodeKind_Win32ModuleNotFound,
4545
CTRL_ExceptionCodeKind_Win32ProcedureNotFound,
4646
CTRL_ExceptionCodeKind_Win32SanitizerErrorDetected,
4747
CTRL_ExceptionCodeKind_Win32SanitizerRawAccessViolation,
48+
CTRL_ExceptionCodeKind_Win32DirectXDebugLayer,
4849
CTRL_ExceptionCodeKind_COUNT
4950
} CTRL_ExceptionCodeKind;
5051

@@ -87,6 +88,7 @@ U32 ctrl_exception_code_kind_code_table[] =
8788
0xc06d007f,
8889
0xe073616e,
8990
0xe0736171,
91+
0x0000087a,
9092
};
9193

9294
String8 ctrl_exception_code_kind_display_string_table[] =
@@ -128,6 +130,7 @@ str8_lit_comp("(Win32) Module Not Found"),
128130
str8_lit_comp("(Win32) Procedure Not Found"),
129131
str8_lit_comp("(Win32) Sanitizer Error Detected"),
130132
str8_lit_comp("(Win32) Sanitizer Raw Access Violation"),
133+
str8_lit_comp("(Win32) DirectX Debug Layer"),
131134
};
132135

133136
String8 ctrl_exception_code_kind_lowercase_code_string_table[] =
@@ -169,6 +172,7 @@ str8_lit_comp("win32_module_not_found"),
169172
str8_lit_comp("win32_procedure_not_found"),
170173
str8_lit_comp("win32_sanitizer_error_detected"),
171174
str8_lit_comp("win32_sanitizer_raw_access_violation"),
175+
str8_lit_comp("win32_directx_debug_layer"),
172176
};
173177

174178
B8 ctrl_exception_code_kind_default_enable_table[] =
@@ -210,6 +214,7 @@ B8 ctrl_exception_code_kind_default_enable_table[] =
210214
0,
211215
1,
212216
0,
217+
1,
213218
};
214219

215220

src/df/core/df_core.c

+10-6
Original file line numberDiff line numberDiff line change
@@ -4726,18 +4726,22 @@ df_string_from_simple_typed_eval(Arena *arena, TG_Graph *graph, RADDBG_Parsed *r
47264726
}
47274727
if(flags & DF_EvalVizStringFlag_ReadOnlyDisplayRules)
47284728
{
4729-
result = push_str8f(arena, "0x%I64x%s%S%s", eval.imm_u64,
4730-
constant_name.size != 0 ? " (" : "",
4731-
constant_name,
4732-
constant_name.size != 0 ? ")" : "");
4729+
if(constant_name.size != 0)
4730+
{
4731+
result = push_str8f(arena, "0x%I64x (%S)", eval.imm_u64, constant_name);
4732+
}
4733+
else if(constant_name.size != 0)
4734+
{
4735+
result = push_str8f(arena, "0x%I64x (%I64u)", eval.imm_u64, eval.imm_u64);
4736+
}
47334737
}
47344738
else if(constant_name.size != 0)
47354739
{
4736-
result = push_str8f(arena, "%S", constant_name);
4740+
result = push_str8_copy(arena, constant_name);
47374741
}
47384742
else
47394743
{
4740-
result = push_str8f(arena, "0x%I64x", eval.imm_u64);
4744+
result = push_str8f(arena, "0x%I64x (%I64u)", eval.imm_u64, eval.imm_u64);
47414745
}
47424746
scratch_end(scratch);
47434747
}break;

src/df/gfx/df_views.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -2450,7 +2450,8 @@ DF_VIEW_UI_FUNCTION_DEF(FileSystem)
24502450
UI_TextColor(df_rgba_from_theme_color(DF_ThemeColor_WeakText))
24512451
{
24522452
DateTime time = date_time_from_dense_time(file->props.modified);
2453-
String8 string = push_date_time_string(scratch.arena, &time);
2453+
DateTime time_local = os_local_time_from_universal_time(&time);
2454+
String8 string = push_date_time_string(scratch.arena, &time_local);
24542455
ui_label(string);
24552456
}
24562457

0 commit comments

Comments
 (0)