Skip to content

Commit 27df340

Browse files
committed
Harmony port: video device
1 parent d4039d3 commit 27df340

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/video/ohos/SDL_ohosvideo.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
bool OHOS_VideoInit(SDL_VideoDevice *_this)
1313
{
14-
_this->num_displays = 1;
1514
SDL_DisplayMode mode;
1615
SDL_zero(mode);
1716
mode.format = SDL_PIXELFORMAT_RGBA32;
@@ -20,11 +19,8 @@ bool OHOS_VideoInit(SDL_VideoDevice *_this)
2019
mode.refresh_rate = 60;
2120

2221
SDL_DisplayID displayID = SDL_AddBasicVideoDisplay(&mode);
23-
if (displayID == 0) {
24-
return false;
25-
}
26-
_this->displays = SDL_calloc(1, sizeof(SDL_VideoDisplay*));
27-
_this->displays[0] = SDL_GetVideoDisplay(displayID);
22+
SDL_Log("testvid: %u", displayID);
23+
SDL_Log("testvid: %u", _this->displays[0]->id);
2824
return true;
2925
}
3026
void OHOS_VideoQuit(SDL_VideoDevice *_this)

0 commit comments

Comments
 (0)