diff options
author | pk33 <pk33@pk33.space> | 2024-11-03 22:26:28 +0100 |
---|---|---|
committer | pk33 <pk33@pk33.space> | 2024-11-03 22:26:28 +0100 |
commit | 0ffb4f8463e3e06e8d88b7be22f5cb7adb702361 (patch) | |
tree | 05e626d6ce4e0d8e544a40f8a14965cf4fdd5780 /src/display.c | |
parent | 6c69ea8da9d306e4e6d21d0feee5213fea15f49e (diff) | |
download | engine33-0ffb4f8463e3e06e8d88b7be22f5cb7adb702361.tar.gz |
fonts, text and basic ui for on-screen log
Diffstat (limited to 'src/display.c')
-rw-r--r-- | src/display.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/display.c b/src/display.c index 806b78e..bad4d69 100644 --- a/src/display.c +++ b/src/display.c @@ -156,6 +156,7 @@ void display_flip( void ) __display.crtc.fb_id = __display.fb.id[i]; if( e33_ioctl( __display.devfd, (int)DRM_IOCTL_MODE_SETCRTC, &__display.crtc ) == -1 ) { + logw( "Failed to set CRTC for page flip prep. Skipping" ); return; } @@ -164,9 +165,7 @@ void display_flip( void ) flip.user_data = ((__u64)(&__display.crtc.crtc_id)); flip.flags = DRM_MODE_PAGE_FLIP_EVENT; - if( e33_ioctl( __display.devfd, (int)DRM_IOCTL_MODE_PAGE_FLIP, &flip ) == -1 ) { - return; - } + e33_ioctl( __display.devfd, (int)DRM_IOCTL_MODE_PAGE_FLIP, &flip ); /* TODO remove later */ memset( __display.surface.data, 0, (uSize)__display.fb.size ); @@ -314,7 +313,7 @@ static Size _get_drm_connector( void ) if( connector->connection == 1 && connector->count_modes > 0 && - connector->count_encoders > 0 + connector->count_encoders > 0 ) { connector->modes_ptr = (__u64)drmData.connModes; connector->props_ptr = (__u64)drmData.connProps; @@ -324,7 +323,7 @@ static Size _get_drm_connector( void ) if( e33_ioctl( __display.devfd, (int)DRM_IOCTL_MODE_GETCONNECTOR, connector) == -1 ) { continue; } - + for( j = 0; j < connector->count_modes; ++j ) { struct drm_mode_modeinfo *mode = &drmData.connModes[j]; |