Files
tactility/Devices/simulator/Source/drivers/sdl_display.h
T
Ken Van Hoeylandt 643cbc3806 Implement posix app loading (#643)
- Added POSIX desktop support for SDK builds, application packaging, and integration testing.
- Added POSIX filesystem partitions and improved application path handling.
- Added simulator support for loading and running applications dynamically.
- Improved simulator task stack handling and display startup reliability.
- Improved simulator display scaling, resizing, high-DPI support, and pointer accuracy.
- Fixed LVGL timers and input polling on POSIX. (fixes simulator with Linux on some Intel graphics platforms)
- Standardized data paths across platforms.
- Logging now works via separate task: this allows apps to write to log without it affecting their stdout (for apps that output text as relevant date for other apps, like the File Selection app)
- Fixes for app stdio
2026-08-31 22:09:04 +02:00

36 lines
1.0 KiB
C

// SPDX-License-Identifier: Apache-2.0
#pragma once
#include <SDL2/SDL.h>
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
struct SdlDisplayConfig {
uint16_t horizontal_resolution;
uint16_t vertical_resolution;
};
/**
* @return the display's renderer, or NULL if the display hasn't drawn its first frame yet
* (see sdl_display_lazy_init() in sdl_display.cpp). Used by sdl_input.cpp to map window
* coordinates back to the fixed logical resolution the renderer scales to fit the window.
*/
SDL_Renderer* sdl_display_get_renderer(void);
/**
* @brief Re-presents the already-drawn frame at the renderer's current scale. Call this when the
* window is resized: the window size change alone doesn't make SDL re-blit the last frame at
* the new scale until something calls SDL_RenderPresent() again, and LVGL won't do that on
* its own since nothing it's tracking actually changed. No-op if the display hasn't drawn its
* first frame yet.
*/
void sdl_display_present_now(void);
#ifdef __cplusplus
}
#endif