mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 13:08:50 +02:00
libobs/util: Fix character encoding issue
Manually specifies the UTF-8 character codes used by the file rather than relying on the compiler to determine what the codes are manually. I was getting compile errors due to the fact that my current code page is not at the default code page; so visual c++ tried to use my current code page rather than UTF-8 and it would cause an error on the file.
This commit is contained in:
parent
3488039e8c
commit
cd222f8ce0
@ -487,6 +487,11 @@ typedef void (*profile_entry_print_func)(profiler_snapshot_entry_t *entry,
|
|||||||
struct dstr *indent_buffer, struct dstr *output_buffer,
|
struct dstr *indent_buffer, struct dstr *output_buffer,
|
||||||
unsigned indent, uint64_t active, uint64_t parent_calls);
|
unsigned indent, uint64_t active, uint64_t parent_calls);
|
||||||
|
|
||||||
|
/* UTF-8 characters */
|
||||||
|
#define VPIPE_RIGHT " \xe2\x94\xa3"
|
||||||
|
#define VPIPE " \xe2\x95\x83"
|
||||||
|
#define DOWN_RIGHT " \xe2\x94\x97"
|
||||||
|
|
||||||
static void make_indent_string(struct dstr *indent_buffer, unsigned indent,
|
static void make_indent_string(struct dstr *indent_buffer, unsigned indent,
|
||||||
uint64_t active)
|
uint64_t active)
|
||||||
{
|
{
|
||||||
@ -501,9 +506,9 @@ static void make_indent_string(struct dstr *indent_buffer, unsigned indent,
|
|||||||
const char *fragment = "";
|
const char *fragment = "";
|
||||||
bool last = i + 1 == indent;
|
bool last = i + 1 == indent;
|
||||||
if (active & ((uint64_t)1 << i))
|
if (active & ((uint64_t)1 << i))
|
||||||
fragment = last ? " ┣" : " ┃";
|
fragment = last ? VPIPE_RIGHT : VPIPE;
|
||||||
else
|
else
|
||||||
fragment = last ? " ┗" : " ";
|
fragment = last ? DOWN_RIGHT : " ";
|
||||||
|
|
||||||
dstr_cat(indent_buffer, fragment);
|
dstr_cat(indent_buffer, fragment);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user