chore(cpn): build for Windows with Visual Studio (#6476)

This commit is contained in:
Raphael Coeffic
2025-08-14 10:06:24 +10:00
committed by GitHub
parent 6d9819f5bf
commit 96610449ef
20 changed files with 169 additions and 181 deletions
+1 -3
View File
@@ -21,8 +21,6 @@
#pragma once
#include <keys.h>
#define MESSAGEBOX_X 8
#define MESSAGEBOX_Y 8
#define MESSAGEBOX_W (LCD_W - 15)
@@ -44,4 +42,4 @@ enum {
MENU_OFFSET_EXTERNAL
};
#include "../common/stdlcd/popups.h"
#include "common/stdlcd/popups_common.h"
+1 -1
View File
@@ -42,4 +42,4 @@ enum {
MENU_OFFSET_EXTERNAL
};
#include "../common/stdlcd/popups.h"
#include "common/stdlcd/popups_common.h"
+5
View File
@@ -27,8 +27,11 @@
#include "libopenui_defines.h"
#include "lz4_fonts.h"
#if !defined(BOOT)
extern "C" {
extern const etxLz4Font lv_font_en_bold_XXL;
#define FONT_TABLE(name) \
@@ -74,6 +77,8 @@ FONT_TABLE(ua);
FONT_TABLE(en);
#endif
} // extern "C"
/*
Decompress an LZ4 font and build LVGL font structures.
*/
@@ -185,6 +185,5 @@ void LayoutFactory::disposeCustomScreen(unsigned idx)
LayoutFactory::LayoutFactory(const char* id, const char* name) :
id(id), name(name)
{
TRACE("register layout %s", getId());
getRegisteredLayouts().push_back(this);
}
@@ -204,7 +204,6 @@ std::list<const WidgetFactory*>& WidgetFactory::getRegisteredWidgets()
void WidgetFactory::unregisterWidget(const WidgetFactory* factory)
{
TRACE("unregister widget %s", factory->getName());
getRegisteredWidgets().remove(factory);
}
@@ -226,7 +225,6 @@ void WidgetFactory::registerWidget(const WidgetFactory* factory)
if (oldWidget) {
unregisterWidget(oldWidget);
}
TRACE("register widget %s %s", name, factory->getDisplayName());
for (auto it = getRegisteredWidgets().cbegin();
it != getRegisteredWidgets().cend(); ++it) {
if (strcasecmp((*it)->getDisplayName(), factory->getDisplayName()) > 0) {
+4 -11
View File
@@ -27,17 +27,10 @@
#define LEN_ZONE_OPTION_STRING 12
#if defined(_MSC_VER)
#define OPTION_VALUE_UNSIGNED(x) { uint32_t(x) }
#define OPTION_VALUE_SIGNED(x) { int32_t(x) }
#define OPTION_VALUE_BOOL(x) { bool(x) }
#define OPTION_VALUE_STRING(...) { *(ZoneOptionValue *)(const char *) #__VA_ARGS__ }
#else
#define OPTION_VALUE_UNSIGNED(x) ZoneOptionValue{ .unsignedValue = (x) }
#define OPTION_VALUE_SIGNED(x) ZoneOptionValue{ .signedValue = (x) }
#define OPTION_VALUE_BOOL(x) ZoneOptionValue{ .boolValue = (x) }
#define OPTION_VALUE_STRING(...) ZoneOptionValue{ .stringValue = { __VA_ARGS__ } }
#endif
#define OPTION_VALUE_UNSIGNED(x) ZoneOptionValue{ .unsignedValue = (x) }
#define OPTION_VALUE_SIGNED(x) ZoneOptionValue{ .signedValue = (x) }
#define OPTION_VALUE_BOOL(x) ZoneOptionValue{ .boolValue = (x) }
#define OPTION_VALUE_STRING(...) ZoneOptionValue{ .stringValue = { __VA_ARGS__ } }
union ZoneOptionValue
{
@@ -26,6 +26,11 @@
#include "dma2d.h"
#include "lua/lua_event.h"
#if defined(_WIN32) || defined(_WIN64)
#define strcasecmp _stricmp
#define strncasecmp _strnicmp
#endif
lua_State *lsStandalone = nullptr;
#if defined(LUA_ALLOCATOR_TRACER)