Skip to content

Commit

Permalink
fix: example app on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmercerind committed Apr 8, 2022
1 parent 08c7e92 commit 552adcd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion example/windows/runner/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
#include <flutter/flutter_view_controller.h>
#include <windows.h>

#include "flutter_native_view/flutter_native_view_plugin.h"
#include "flutter_window.h"
#include "utils.h"

int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
_In_ wchar_t *command_line, _In_ int show_command) {
_In_ wchar_t* command_line, _In_ int show_command) {
if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {
CreateAndAttachConsole();
}
Expand All @@ -21,6 +22,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
return EXIT_FAILURE;
}
window.SetQuitOnClose(true);
flutternativeview::CreateNativeViewContainer();
MSG msg;
while (GetMessage(&msg, nullptr, 0, 0)) {
TranslateMessage(&msg);
Expand Down

0 comments on commit 552adcd

Please sign in to comment.