Harden editor window runtime boundary

This commit is contained in:
2026-04-26 17:49:30 +08:00
parent b8599a8aff
commit a89b5c9aec
6 changed files with 89 additions and 44 deletions

View File

@@ -15,6 +15,8 @@
#include <string_view>
#include <utility>
#include <windows.h>
namespace XCEngine::UI::Editor::App {
using App::LoadEmbeddedPngTexture;
@@ -122,10 +124,11 @@ const ::XCEngine::UI::UITextureHandle& EditorWindowRuntimeController::GetTitleBa
}
bool EditorWindowRuntimeController::Initialize(
HWND hwnd,
void* nativeWindowHandle,
const std::filesystem::path& repoRoot,
const std::filesystem::path& captureRoot,
bool autoCaptureOnStartup) {
HWND hwnd = static_cast<HWND>(nativeWindowHandle);
if (hwnd == nullptr) {
LogRuntimeTrace("app", "window initialize skipped: hwnd is null");
return false;
@@ -247,7 +250,7 @@ void EditorWindowRuntimeController::ResetInteractionState() {
ResetFrameTiming();
}
bool EditorWindowRuntimeController::ApplyResize(UINT width, UINT height) {
bool EditorWindowRuntimeController::ApplyResize(std::uint32_t width, std::uint32_t height) {
if (!m_ready || width == 0u || height == 0u) {
return false;
}