use default aspect ratio when no camera exists
This commit is contained in:
parent
6ac44c3de9
commit
1fbe42b3b9
@ -32,7 +32,7 @@
|
||||
* <Delay> = <USER_INTERP_RATIO> * <Tick interval>
|
||||
* E.g: At 1.5, the user thread will render 75ms back in time if the sim runs at 50tps
|
||||
*/
|
||||
#define USER_INTERP_RATIO 1.5
|
||||
#define USER_INTERP_RATIO 1.2
|
||||
#define USER_INTERP_ENABLED 1
|
||||
|
||||
/* 64^2 = 4096 bins */
|
||||
|
||||
@ -777,10 +777,9 @@ INTERNAL void user_update(void)
|
||||
G.ui_size = G.screen_size;
|
||||
G.ui_screen_offset = V2(0, 0);
|
||||
} else {
|
||||
|
||||
/* Determine ui size by camera & window dimensions */
|
||||
f32 aspect_ratio = 1.0;
|
||||
{
|
||||
f32 aspect_ratio = DEFAULT_CAMERA_WIDTH / DEFAULT_CAMERA_HEIGHT;
|
||||
if (local_camera->valid) {
|
||||
struct xform quad_xf = xform_mul(sim_ent_get_xform(local_camera), local_camera->camera_quad_xform);
|
||||
struct v2 camera_size = xform_get_scale(quad_xf);
|
||||
if (!v2_is_zero(camera_size)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user