Skip to content

Commit

Permalink
Fix linux journal
Browse files Browse the repository at this point in the history
  • Loading branch information
Speak2Erase committed Jul 6, 2024
1 parent 9f582cc commit fbe4ba3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions journal/journal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ int server_thread(void *data) {

int render_thread(void* data) {
Ctx *ctx = (Ctx *)data;
ctx->renderer = SDL_CreateRenderer(ctx->window, NULL, SDL_RENDERER_SOFTWARE);

ctx->texture = SDL_CreateTextureFromSurface(ctx->renderer, ctx->surface);

// I would move this into one line but apparently that leaves things uninitialized???
// C++ what the fuck
Expand Down Expand Up @@ -276,10 +279,6 @@ void journal_handling(const stbi_uc* initial_image_buf, size_t initial_image_buf
ctx.window =
SDL_CreateWindow(" ", w, h, SDL_WINDOW_TRANSPARENT | SDL_WINDOW_HIDDEN);

ctx.renderer = SDL_CreateRenderer(ctx.window, NULL, SDL_RENDERER_SOFTWARE);

ctx.texture = SDL_CreateTextureFromSurface(ctx.renderer, ctx.surface);

SDL_SetWindowHitTest(ctx.window, hit_test_fun, ctx.surface);

ctx.running = true;
Expand Down

0 comments on commit fbe4ba3

Please sign in to comment.