diff --git a/base/sources/backends/ios_system.m b/base/sources/backends/ios_system.m index cf84f63b..c6ba4f2d 100644 --- a/base/sources/backends/ios_system.m +++ b/base/sources/backends/ios_system.m @@ -544,7 +544,7 @@ void importFile(NSURL *url) { UIWindowScene *windowScene = (UIWindowScene *)scene; self.window = [[UIWindow alloc] initWithWindowScene:windowScene]; - self.window.frame = [UIScreen mainScreen].bounds; + self.window.frame = windowScene.coordinateSpace.bounds; [self.window setBackgroundColor:[UIColor blackColor]]; my_view_controller = [[MyViewController alloc] init]; diff --git a/base/sources/ts/console.ts b/base/sources/ts/console.ts index 0a3addec..d51516a9 100644 --- a/base/sources/ts/console.ts +++ b/base/sources/ts/console.ts @@ -19,17 +19,14 @@ function console_draw_toast(s: string) { draw_end(); } -function _console_toast_render(s: string) { - console_draw_toast(s); - gpu_present(); - sys_remove_render_2d(_console_toast_render); -} - function console_toast(s: string) { // Show a popup message - sys_notify_on_render_2d(_console_toast_render, s); + let current: gpu_texture_t = _draw_current; + if (current != null) draw_end(); console_trace(s); + console_draw_toast(s); gpu_present(); + if (current != null) draw_begin(current); } function console_draw_progress() { @@ -50,13 +47,11 @@ function console_progress(s: string) { console_progress_text = s; // Pass one frame to immediately show the message - ///if (!arm_vulkan) // TODO ui_end_input(); draw_end(); sys_render(); draw_begin(); gpu_present(); - ///end } function console_info(s: string) { diff --git a/base/sources/ts/strings.ts b/base/sources/ts/strings.ts index 7db59a3c..2a5e32df 100644 --- a/base/sources/ts/strings.ts +++ b/base/sources/ts/strings.ts @@ -397,13 +397,13 @@ fun envmap_sample(lod: float, coord: float2): float3 { \ "; let str_get_pos_nor_from_depth: string = "\ -fun get_pos_from_depth(uv: float2, invVP: flaot4x4): float3 { \ +fun get_pos_from_depth(uv: float2, invVP: float4x4): float3 { \ var depth: float = sample_lod(gbufferD, sampler_linear, float2(uv.x, 1.0 - uv.y), 0.0).r; \ var wpos: float4 = float4(uv * 2.0 - 1.0, depth * 2.0 - 1.0, 1.0); \ wpos = invVP * wpos; \ return wpos.xyz / wpos.w; \ } \ -fun get_nor_from_depth(p0: float3, uv: float2, invVP: flaot4x4, tex_step: float2): float3 { \ +fun get_nor_from_depth(p0: float3, uv: float2, invVP: float4x4, tex_step: float2): float3 { \ var p1: float3 = get_pos_from_depth(uv + float2(tex_step.x * 4.0, 0.0), invVP); \ var p2: float3 = get_pos_from_depth(uv + float2(0.0, tex_step.y * 4.0), invVP); \ return normalize(cross(p2 - p0, p1 - p0)); \ diff --git a/base/sources/ts/ui_base.ts b/base/sources/ts/ui_base.ts index a6fcfbff..69a88a7b 100644 --- a/base/sources/ts/ui_base.ts +++ b/base/sources/ts/ui_base.ts @@ -872,8 +872,10 @@ function ui_base_update_ui() { // Same mapping for paint and rotate (predefined in touch keymap) if (context_in_viewport()) { - if (mouse_started() && map_get(config_keymap, "action_paint") == map_get(config_keymap, "action_rotate")) { - ui_base_action_paint_remap = map_get(config_keymap, "action_paint"); + let paint_key: string = map_get(config_keymap, "action_paint"); + let rotate_key: string = map_get(config_keymap, "action_rotate"); + if (mouse_started() && paint_key == rotate_key) { + ui_base_action_paint_remap = paint_key; util_render_pick_pos_nor_tex(); let is_mesh: bool = math_abs(context_raw.posx_picked) < 50 && math_abs(context_raw.posy_picked) < 50 && math_abs(context_raw.posz_picked) < 50; ///if arm_android