Skip to content

Commit

Permalink
Update tinyui.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
kimkulling authored Jan 27, 2025
1 parent 9a44779 commit bb95062
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/tinyui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ void log_message(LogSeverity severity, const char *message) {

ret_code TinyUi::init(Context &ctx) {
if (ctx.mCreated) {
printf("Error: Context is already inited\n");
return ErrorCode;
}

Expand All @@ -77,6 +78,7 @@ ret_code TinyUi::initScreen(Context &ctx, int32_t x, int32_t y, int32_t w, int32
ret_code TinyUi::getSurfaceInfo(Context &ctx, int32_t &w, int32_t &h) {
w = h = -1;
if (!ctx.mCreated) {
printf("Error: Context is not inited\n");
return ErrorCode;
}

Expand Down Expand Up @@ -109,6 +111,7 @@ ret_code TinyUi::endRender(Context &ctx) {

ret_code TinyUi::release(Context &ctx) {
if (!ctx.mCreated) {
printf("Error: Context is not inited\n");
return ErrorCode;
}
Renderer::releaseRenderer(ctx);
Expand Down

0 comments on commit bb95062

Please sign in to comment.