2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-12-01 08:47:48 +00:00

chore: improve webview code style

This commit is contained in:
Jan Laupetin
2025-10-05 23:23:37 +01:00
parent cb2e83dfca
commit aa0134c341
7 changed files with 142 additions and 148 deletions

View File

@@ -7,9 +7,12 @@
#include <chrono>
#include <format>
#include <string>
#include <iostream>
#include <thread>
using namespace std::string_literals;
#ifdef _WIN32
int WINAPI WinMain(HINSTANCE /*hInst*/, HINSTANCE /*hPrevInst*/, LPSTR /*lpCmdLine*/, int /*nCmdShow*/)
{
@@ -55,13 +58,12 @@ int main()
#if defined(WEBVIEW_PLATFORM_WINDOWS) && defined(WEBVIEW_EDGE)
edge::InstallCustomProtocolHandler(w);
#endif
#if defined(WEBVIEW_PLATFORM_LINUX) && defined(WEBVIEW_GTK)
w.navigate(edge::URL_PREFIX + "index.html"s);
#elif defined(WEBVIEW_PLATFORM_LINUX) && defined(WEBVIEW_GTK)
gtk::InstallCustomProtocolHandler(w);
w.navigate(gtk::URL_PREFIX + "index.html"s);
#endif
w.navigate("modman://localhost/index.html");
w.run();
}
catch (const webview::exception& e)