5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-21 03:19:31 +08:00

[w32] move windows specific code to impl file

This commit is contained in:
Travis McLane 2023-05-02 10:52:21 -05:00
parent 792c5e2d95
commit 86a1de6788
2 changed files with 7 additions and 7 deletions

View File

@ -17,7 +17,6 @@ import (
wailsruntime "github.com/wailsapp/wails/v3/internal/runtime"
"github.com/wailsapp/wails/v3/pkg/events"
"github.com/wailsapp/wails/v3/pkg/logger"
"github.com/wailsapp/wails/v3/pkg/w32"
)
var globalApplication *App
@ -35,12 +34,6 @@ func New(appOptions Options) *App {
return globalApplication
}
err := w32.SetProcessDPIAware()
if err != nil {
println("Fatal error in application initialisation: ", err.Error())
os.Exit(1)
}
mergeApplicationDefaults(&appOptions)
result := &App{

View File

@ -211,6 +211,13 @@ func (m *windowsApp) unregisterWindow(w *windowsWebviewWindow) {
}
func newPlatformApp(app *App) *windowsApp {
err := w32.SetProcessDPIAware()
if err != nil {
println("Fatal error in application initialisation: ", err.Error())
os.Exit(1)
}
result := &windowsApp{
parent: app,
instance: w32.GetModuleHandle(""),