Skip to content

Commit

Permalink
Fix some scoping
Browse files Browse the repository at this point in the history
  • Loading branch information
JVital2013 committed Dec 31, 2023
1 parent 8ceb845 commit 3fc3bda
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions android/backend.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "core/backend.h"
#include "core/style.h"
#include "backend.h"

extern EGLDisplay g_EglDisplay;
Expand Down
1 change: 0 additions & 1 deletion android/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ static float get_dpi();
#include "init.h"
#include "main_ui.h"
#include "loader/loader.h"
#include "core/style.h"

bool was_init = false;

Expand Down
5 changes: 2 additions & 3 deletions src-interface/loader/loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace satdump
{
image::Image<uint8_t> image;
image.load_png(resources::getResourcePath("icon.png"));
px = new uint8_t[image.width() * image.height() * 4];
uint8_t *px = new uint8_t[image.width() * image.height() * 4];
memset(px, 255, image.width() * image.height() * 4);

if (image.channels() == 4)
Expand All @@ -34,14 +34,13 @@ namespace satdump
image_texture = makeImageTexture();
updateImageTexture(image_texture, (uint32_t*)px, image.width(), image.height());
backend::setIcon(px, image.width(), image.height());
image.clear();
delete[] px;
push_frame("Initializing");
}

LoadingScreenSink::~LoadingScreenSink()
{
deleteImageTexture(image_texture);
delete[] px;
}

void LoadingScreenSink::receive(slog::LogMsg log)
Expand Down
1 change: 0 additions & 1 deletion src-interface/loader/loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@ namespace satdump
private:
float scale;
unsigned int image_texture;
uint8_t *px;
};
}

0 comments on commit 3fc3bda

Please sign in to comment.