diff --git a/thermion_flutter/thermion_flutter/windows/thermion_flutter_plugin.cpp b/thermion_flutter/thermion_flutter/windows/thermion_flutter_plugin.cpp index edc57452..251b9836 100644 --- a/thermion_flutter/thermion_flutter/windows/thermion_flutter_plugin.cpp +++ b/thermion_flutter/thermion_flutter/windows/thermion_flutter_plugin.cpp @@ -83,7 +83,7 @@ ResourceBuffer ThermionFlutterPlugin::loadResource(const char *name) { TCHAR pBuf[512]; size_t len = sizeof(pBuf); - int bytes = GetModuleFileName(NULL, pBuf, len); + int bytes = GetModuleFileName(NULL, pBuf, static_cast(len)); std::wstring_convert> converter; std::wstring assetPath = converter.from_bytes(name_str.c_str()); @@ -190,16 +190,9 @@ void ThermionFlutterPlugin::CreateTexture( void ThermionFlutterPlugin::DestroyTexture( const flutter::MethodCall &methodCall, std::unique_ptr> result) { - - const auto *flutterTextureId = std::get_if(methodCall.arguments()); - - if (!flutterTextureId) { - result->Error("NOT_IMPLEMENTED", "Flutter texture ID must be provided"); - return; - } if (_context) { - _context->DestroyTexture(std::move(result)); + _context->DestroyRenderingSurface(std::move(result)); } else { result->Error("NO_CONTEXT", "No rendering context is active");