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:
parent
792c5e2d95
commit
86a1de6788
@ -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{
|
||||
|
@ -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(""),
|
||||
|
Loading…
Reference in New Issue
Block a user