aboutsummaryrefslogtreecommitdiff
path: root/src/display33.c
diff options
context:
space:
mode:
authorpk33 <pk33@pk33.space>2024-11-14 15:06:07 +0100
committerpk33 <pk33@pk33.space>2024-11-14 15:06:07 +0100
commited2a4bc4400c38ecd11baccac5db328b797b5d68 (patch)
treeb703749d0639f933edca4c3a78209159aa735c25 /src/display33.c
parent5a54774474f43ae29716751d6415563a59b92c7d (diff)
downloadengine33-master.tar.gz
begin 3D rendering, basic camera controlsHEADmaster
Diffstat (limited to 'src/display33.c')
-rw-r--r--src/display33.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/display33.c b/src/display33.c
index 928d4e0..c38825a 100644
--- a/src/display33.c
+++ b/src/display33.c
@@ -130,15 +130,10 @@ Error display33_init( void )
}
- __display.surface.w = __display.mode.hdisplay;
- __display.surface.h = __display.mode.vdisplay;
__display.fb.size = (Size)drmData.drmCreateDumb[0].size;
__display.surface.data = __display.fb.map[0];
__display.active = E33_TRUE;
- free( drmData.drmRes_fbs );
- free( drmData.drmRes_encs );
- free( drmData.drmRes_conns );
return E33_EXIT_SUCCESS;
}
@@ -186,6 +181,9 @@ void display33_term( void )
LOGW( "Failed to close graphics device." );
}
+ free( drmData.drmRes_fbs );
+ free( drmData.drmRes_encs );
+ free( drmData.drmRes_conns );
free( drmData.drmRes_crtcs );
if( ioctl(__display.ttyFd, VT_SETMODE, &vtModeOld) < 0 ) {
@@ -333,6 +331,8 @@ static Size _get_drm_connector( void )
mode->hdisplay += 10;
}
+ __display.surface.w = mode->hdisplay;
+ __display.surface.h = mode->vdisplay;
__display.mode = *mode;
return E33_EXIT_SUCCESS;
}