Android fixes
This commit is contained in:
@@ -188,7 +188,7 @@ static void android_app_destroy(struct android_app* android_app) {
|
||||
static void process_input(struct android_app* app, struct android_poll_source* source) {
|
||||
AInputEvent* event = NULL;
|
||||
while (AInputQueue_getEvent(app->inputQueue, &event) >= 0) {
|
||||
LOGV("New input event: type=%d\n", AInputEvent_getType(event));
|
||||
// LOGV("New input event: type=%d\n", AInputEvent_getType(event));
|
||||
if (AInputQueue_preDispatchEvent(app->inputQueue, event)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ function export_arm_run_project() {
|
||||
project_raw.material = c;
|
||||
///end
|
||||
|
||||
///if (arm_metal || arm_vulkan)
|
||||
///if IRON_BGRA
|
||||
project_raw.is_bgra = true;
|
||||
///else
|
||||
project_raw.is_bgra = false;
|
||||
@@ -186,19 +186,19 @@ function export_arm_run_project() {
|
||||
for (let i: i32 = 0; i < 256 * 256 * 4; ++i) {
|
||||
u8a[i] = math_floor(math_pow(u8a[i] / 255, 1.0 / 2.2) * 255);
|
||||
}
|
||||
///if (arm_metal || arm_vulkan)
|
||||
///if IRON_BGRA
|
||||
export_arm_bgra_swap(mesh_icon_pixels);
|
||||
///end
|
||||
|
||||
iron_delete_texture(mesh_icon);
|
||||
|
||||
// raw.mesh_icons =
|
||||
// ///if (arm_metal || arm_vulkan)
|
||||
// ///if IRON_BGRA
|
||||
// [encode(bgra_swap(mesh_icon_pixels)];
|
||||
// ///else
|
||||
// [encode(mesh_icon_pixels)];
|
||||
// ///end
|
||||
|
||||
iron_write_png(substring(project_filepath, 0, project_filepath.length - 4) + "_icon.png", mesh_icon_pixels, 256, 256, 0);
|
||||
iron_delete_texture(mesh_icon);
|
||||
///end
|
||||
|
||||
///if is_paint
|
||||
@@ -289,7 +289,7 @@ function export_arm_run_material(path: string) {
|
||||
|
||||
let micons: buffer_t[] = null;
|
||||
if (!is_cloud) {
|
||||
///if (arm_metal || arm_vulkan)
|
||||
///if IRON_BGRA
|
||||
let buf: buffer_t = lz4_encode(export_arm_bgra_swap(gpu_get_texture_pixels(m.image)));
|
||||
///else
|
||||
let buf: buffer_t = lz4_encode(gpu_get_texture_pixels(m.image));
|
||||
@@ -356,7 +356,7 @@ function export_arm_run_brush(path: string) {
|
||||
|
||||
let bicons: buffer_t[] = null;
|
||||
if (!is_cloud) {
|
||||
///if (arm_metal || arm_vulkan)
|
||||
///if IRON_BGRA
|
||||
let buf: buffer_t = lz4_encode(export_arm_bgra_swap(gpu_get_texture_pixels(b.image)));
|
||||
///else
|
||||
let buf: buffer_t = lz4_encode(gpu_get_texture_pixels(b.image));
|
||||
|
||||
@@ -486,14 +486,14 @@ function export_texture_write_texture(file: string, pixels: buffer_t, type: i32
|
||||
}
|
||||
}
|
||||
|
||||
///if (arm_metal || arm_vulkan)
|
||||
///if IRON_BGRA
|
||||
function _export_texture_channel_bgra_swap(c: i32): i32 {
|
||||
return c == 0 ? 2 : c == 2 ? 0 : c;
|
||||
}
|
||||
///end
|
||||
|
||||
function export_texture_copy_channel(from: buffer_t, from_channel: i32, to: buffer_t, to_channel: i32, linear: bool = true) {
|
||||
///if (arm_metal || arm_vulkan)
|
||||
///if IRON_BGRA
|
||||
from_channel = _export_texture_channel_bgra_swap(from_channel);
|
||||
///end
|
||||
for (let i: i32 = 0; i < math_floor((to.length) / 4); ++i) {
|
||||
@@ -505,7 +505,7 @@ function export_texture_copy_channel(from: buffer_t, from_channel: i32, to: buff
|
||||
}
|
||||
|
||||
function export_texture_copy_channel_inv(from: buffer_t, from_channel: i32, to: buffer_t, to_channel: i32, linear: bool = true) {
|
||||
///if (arm_metal || arm_vulkan)
|
||||
///if IRON_BGRA
|
||||
from_channel = _export_texture_channel_bgra_swap(from_channel);
|
||||
///end
|
||||
for (let i: i32 = 0; i < math_floor((to.length) / 4); ++i) {
|
||||
@@ -517,7 +517,7 @@ function export_texture_copy_channel_inv(from: buffer_t, from_channel: i32, to:
|
||||
}
|
||||
|
||||
function export_texture_extract_channel(from: buffer_t, from_channel: i32, to: buffer_t, to_channel: i32, step: i32, mask: i32, linear: bool = true) {
|
||||
///if (arm_metal || arm_vulkan)
|
||||
///if IRON_BGRA
|
||||
from_channel = _export_texture_channel_bgra_swap(from_channel);
|
||||
///end
|
||||
for (let i: i32 = 0; i < math_floor((to.length) / 4); ++i) {
|
||||
|
||||
@@ -253,7 +253,7 @@ function ui_view2d_render() {
|
||||
draw_scaled_image(_ui_view2d_render_tex, -_ui_view2d_render_x, -_ui_view2d_render_y, _ui_view2d_render_tw, _ui_view2d_render_th);
|
||||
draw_end();
|
||||
let a: buffer_t = gpu_get_texture_pixels(texpaint_picker);
|
||||
///if (arm_metal || arm_vulkan)
|
||||
///if IRON_BGRA
|
||||
let i0: i32 = 2;
|
||||
let i1: i32 = 1;
|
||||
let i2: i32 = 0;
|
||||
|
||||
Reference in New Issue
Block a user