diff --git a/src/app/app.h b/src/app/app.h index b8f8639..b789a81 100644 --- a/src/app/app.h +++ b/src/app/app.h @@ -407,7 +407,7 @@ void ORCA_IMPORT(oc_request_quit)(void); void ORCA_IMPORT(oc_runtime_window_set_title)(oc_str8 title); -void ORCA_IMPORT(oc_runtime_window_set_size)(f32 width, f32 height); +void ORCA_IMPORT(oc_runtime_window_set_size)(oc_vec2 size); #endif // !defined(OC_PLATFORM_ORCA) || !(OC_PLATFORM_ORCA) diff --git a/src/runtime.c b/src/runtime.c index 8a820ec..47e6b2b 100644 --- a/src/runtime.c +++ b/src/runtime.c @@ -92,9 +92,9 @@ void oc_runtime_window_set_title(oc_str8 title) } } -void oc_runtime_window_set_size(f32 width, f32 height) +void oc_runtime_window_set_size(oc_vec2 size) { - oc_window_set_content_size(__orcaApp.window, (oc_vec2){ .x = width, .y = height }); + oc_window_set_content_size(__orcaApp.window, size); } void oc_runtime_log(oc_log_level level, diff --git a/src/wasmbind/core_api.json b/src/wasmbind/core_api.json index c237570..7cc1a5f 100644 --- a/src/wasmbind/core_api.json +++ b/src/wasmbind/core_api.json @@ -84,10 +84,8 @@ "cname": "oc_runtime_window_set_size", "ret": {"name": "void", "tag": "v"}, "args": [ - { "name": "width", - "type": {"name": "f32", "tag": "f"}}, - { "name": "height", - "type": {"name": "f32", "tag": "f"}} + { "name": "size", + "type": {"name": "oc_vec2", "tag": "S"}} ] } ]