Skip to content
This repository was archived by the owner on Apr 5, 2022. It is now read-only.

Commit e25faba

Browse files
committed
feat: create webview2 folder in appdata
1 parent 38843b9 commit e25faba

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/webview/windows/webview2.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,11 @@ namespace Soundux
120120
UpdateWindow(hwnd);
121121
SetFocus(hwnd);
122122

123-
auto envResult = CreateCoreWebView2Environment(
123+
std::string appdata = std::getenv("APPDATA");
124+
appdata += "\\..\\Local\\MicrosoftEdge";
125+
126+
auto envResult = CreateCoreWebView2EnvironmentWithOptions(
127+
nullptr, widen(appdata).c_str(), nullptr,
124128
Microsoft::WRL::Callback<ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler>(
125129
[&](auto res, ICoreWebView2Environment *env) -> HRESULT {
126130
auto controllerResult = env->CreateCoreWebView2Controller(

0 commit comments

Comments
 (0)