upgrade: beta fix: macosx close bug

This commit is contained in:
yanghy 2022-12-09 21:51:11 +08:00
parent 5ea72a428f
commit 70da06cf67
2 changed files with 2 additions and 9 deletions

View File

@ -28,13 +28,8 @@ func NewApplication(cfg *tCefApplicationConfig) *TCEFApplication {
}
cfg.framework()
result := new(TCEFApplication)
if Args.IsMain() {
r1, _, _ := Proc(internale_CEFApplication_Create).Call(uintptr(unsafe.Pointer(cfg)))
result.instance = unsafe.Pointer(r1)
} else {
r1, _, _ := Proc(internale_CEFApplicationSub_Create).Call(uintptr(unsafe.Pointer(cfg)))
result.instance = unsafe.Pointer(r1)
}
r1, _, _ := Proc(internale_CEFApplication_Create).Call(uintptr(unsafe.Pointer(cfg)))
result.instance = unsafe.Pointer(r1)
//register default function
result.defaultSetOnContextCreated()
result.defaultSetOnProcessMessageReceived()

View File

@ -32,7 +32,6 @@ func init() {
dllimports.NewEnergyImport("AddCustomCommandLine", 0),
//application
dllimports.NewEnergyImport("CEFApplication_Create", 0),
dllimports.NewEnergyImport("CEFApplicationSub_Create", 0),
dllimports.NewEnergyImport("CEFApplication_Destroy", 0),
dllimports.NewEnergyImport("CEFApplication_Free", 0),
dllimports.NewEnergyImport("CEFApplication_StopScheduler", 0),
@ -363,7 +362,6 @@ const (
internale_AddCustomCommandLine
//application
internale_CEFApplication_Create
internale_CEFApplicationSub_Create
internale_CEFApplication_Destroy
internale_CEFApplication_Free
internale_CEFApplication_StopScheduler