This commit is contained in:
milek7
2019-07-09 22:09:37 +02:00
parent a0c44fbaa3
commit 8f7e06c25c
19 changed files with 227 additions and 1079 deletions

View File

@@ -4,7 +4,7 @@
#include "Logs.h"
ui::cameraview_panel::cameraview_panel()
: ui_panel(STR_C(cameraview_window), false)
: ui_panel(STR_C("Camera preview"), false)
{
size_min = { -2, -2 };
}
@@ -103,6 +103,7 @@ void ui::cameraview_panel::workthread_func()
if (buffer) {
int w, h;
stbi_set_flip_vertically_on_load(0);
uint8_t *image = stbi_load_from_memory(buffer, len, &w, &h, nullptr, 4);
if (!image)
ErrorLog(std::string(stbi_failure_reason()));