mirror of
https://github.com/Ed94/VEFontCache-Odin.git
synced 2025-08-10 08:34:01 -07:00
update sokol to latest
This commit is contained in:
21
thirdparty/sokol/c/sokol_app.h
vendored
21
thirdparty/sokol/c/sokol_app.h
vendored
@@ -2664,6 +2664,7 @@ typedef struct {
|
||||
HICON small_icon;
|
||||
HCURSOR cursors[_SAPP_MOUSECURSOR_NUM];
|
||||
UINT orig_codepage;
|
||||
WCHAR surrogate;
|
||||
RECT stored_window_rect; // used to restore window pos/size when toggling fullscreen => windowed
|
||||
bool is_win10_or_greater;
|
||||
bool in_create_window;
|
||||
@@ -7558,11 +7559,20 @@ _SOKOL_PRIVATE void _sapp_win32_key_event(sapp_event_type type, int vk, bool rep
|
||||
|
||||
_SOKOL_PRIVATE void _sapp_win32_char_event(uint32_t c, bool repeat) {
|
||||
if (_sapp_events_enabled() && (c >= 32)) {
|
||||
_sapp_init_event(SAPP_EVENTTYPE_CHAR);
|
||||
_sapp.event.modifiers = _sapp_win32_mods();
|
||||
_sapp.event.char_code = c;
|
||||
_sapp.event.key_repeat = repeat;
|
||||
_sapp_call_event(&_sapp.event);
|
||||
if (c >= 0xD800 && c <= 0xDBFF) {
|
||||
_sapp.win32.surrogate = (WCHAR)c - 0xD800;
|
||||
} else {
|
||||
if (c > 0xDC00 && c <= 0xDFFF) {
|
||||
c = (uint32_t)(_sapp.win32.surrogate) << 10 | (c - 0xDC00);
|
||||
c += 0x10000;
|
||||
_sapp.win32.surrogate = 0;
|
||||
}
|
||||
_sapp_init_event(SAPP_EVENTTYPE_CHAR);
|
||||
_sapp.event.modifiers = _sapp_win32_mods();
|
||||
_sapp.event.char_code = c;
|
||||
_sapp.event.key_repeat = repeat;
|
||||
_sapp_call_event(&_sapp.event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7922,6 +7932,7 @@ _SOKOL_PRIVATE void _sapp_win32_create_window(void) {
|
||||
const int win_width = rect.right - rect.left;
|
||||
const int win_height = rect.bottom - rect.top;
|
||||
_sapp.win32.in_create_window = true;
|
||||
_sapp.win32.surrogate = 0;
|
||||
_sapp.win32.hwnd = CreateWindowExW(
|
||||
win_ex_style, // dwExStyle
|
||||
L"SOKOLAPP", // lpClassName
|
||||
|
13
thirdparty/sokol/c/sokol_debugtext.h
vendored
13
thirdparty/sokol/c/sokol_debugtext.h
vendored
@@ -753,6 +753,9 @@ SOKOL_DEBUGTEXT_API_DECL void sdtx_putr(const char* str, int len); // 'put ra
|
||||
SOKOL_DEBUGTEXT_API_DECL int sdtx_printf(const char* fmt, ...) SOKOL_DEBUGTEXT_PRINTF_ATTR;
|
||||
SOKOL_DEBUGTEXT_API_DECL int sdtx_vprintf(const char* fmt, va_list args);
|
||||
|
||||
/* language bindings helper: get the internal printf format buffer */
|
||||
SOKOL_DEBUGTEXT_API_DECL sdtx_range sdtx_get_cleared_fmt_buffer(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
/* C++ const-ref wrappers */
|
||||
@@ -4955,6 +4958,16 @@ SOKOL_DEBUGTEXT_API_DECL int sdtx_printf(const char* fmt, ...) {
|
||||
return res;
|
||||
}
|
||||
|
||||
SOKOL_DEBUGTEXT_API_DECL sdtx_range sdtx_get_cleared_fmt_buffer(void) {
|
||||
SOKOL_ASSERT(_SDTX_INIT_COOKIE == _sdtx.init_cookie);
|
||||
SOKOL_ASSERT(_sdtx.fmt_buf && (_sdtx.fmt_buf_size >= 2));
|
||||
memset(_sdtx.fmt_buf, 0, _sdtx.fmt_buf_size);
|
||||
sdtx_range res; _sdtx_clear(&res, sizeof(res));
|
||||
res.ptr = _sdtx.fmt_buf;
|
||||
res.size = _sdtx.fmt_buf_size - 1;
|
||||
return res;
|
||||
}
|
||||
|
||||
SOKOL_API_IMPL void sdtx_draw(void) {
|
||||
SOKOL_ASSERT(_SDTX_INIT_COOKIE == _sdtx.init_cookie);
|
||||
_sdtx_context_t* ctx = _sdtx.cur_ctx;
|
||||
|
4
thirdparty/sokol/c/sokol_gfx.h
vendored
4
thirdparty/sokol/c/sokol_gfx.h
vendored
@@ -254,8 +254,8 @@
|
||||
Both sg_apply_viewport() and sg_apply_scissor_rect() must be called
|
||||
inside a rendering pass (e.g. not in a compute pass, or outside a pass)
|
||||
|
||||
Note that sg_begin_default_pass() and sg_begin_pass() will reset both the
|
||||
viewport and scissor rectangles to cover the entire framebuffer.
|
||||
Note that sg_begin_pass() will reset both the viewport and scissor
|
||||
rectangles to cover the entire framebuffer.
|
||||
|
||||
--- to update (overwrite) the content of buffer and image resources, call:
|
||||
|
||||
|
Reference in New Issue
Block a user