mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
kmsdrm: Small fix, missing bracket.
This commit is contained in:
parent
87a86675ed
commit
ad9ec8b363
@ -162,7 +162,7 @@ static dumb_buffer *KMSDRM_CreateDumbBuffer(_THIS)
|
||||
struct drm_mode_destroy_dumb destroy;
|
||||
|
||||
dumb_buffer *ret = SDL_calloc(1, sizeof(*ret));
|
||||
if (!ret)
|
||||
if (!ret) {
|
||||
SDL_OutOfMemory();
|
||||
return NULL;
|
||||
}
|
||||
@ -207,6 +207,7 @@ static dumb_buffer *KMSDRM_CreateDumbBuffer(_THIS)
|
||||
map = (struct drm_mode_map_dumb) {
|
||||
.handle = ret->gem_handles[0],
|
||||
};
|
||||
|
||||
if (KMSDRM_drmIoctl(viddata->drm_fd, DRM_IOCTL_MODE_MAP_DUMB, &map)) {
|
||||
SDL_SetError("failed to get mmap offset for the dumb buffer.");
|
||||
goto err_dumb;
|
||||
@ -214,6 +215,7 @@ static dumb_buffer *KMSDRM_CreateDumbBuffer(_THIS)
|
||||
|
||||
ret->dumb.mem = mmap(NULL, create.size, PROT_WRITE, MAP_SHARED,
|
||||
viddata->drm_fd, map.offset);
|
||||
|
||||
if (ret->dumb.mem == MAP_FAILED) {
|
||||
SDL_SetError("failed to get mmap offset for the dumb buffer.");
|
||||
goto err_dumb;
|
||||
|
Loading…
Reference in New Issue
Block a user