From cd7482fa055ac145835465b2c924b1629cd502e6 Mon Sep 17 00:00:00 2001 From: Evan Su <48808396+HACKERALERT@users.noreply.github.com> Date: Sun, 4 Sep 2022 19:23:37 -0400 Subject: [PATCH] Put syscall under build constraint --- src/Picocrypt.go | 10 ++-------- src/go.mod | 2 +- src/go.sum | 4 ++-- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/Picocrypt.go b/src/Picocrypt.go index ec38880..8beaf79 100644 --- a/src/Picocrypt.go +++ b/src/Picocrypt.go @@ -28,10 +28,8 @@ import ( "os" "path/filepath" "regexp" - "runtime" "strconv" "strings" - "syscall" "time" "github.com/HACKERALERT/clipboard" @@ -2020,12 +2018,8 @@ func sizeify(size int64) string { } func main() { - // Set DPI awareness to system aware (value of 1) - if runtime.GOOS == "windows" { - shcore := syscall.NewLazyDLL("Shcore.dll") - shproc := shcore.NewProc("SetProcessDpiAwareness") - shproc.Call(uintptr(1)) - } + // Set DPI awareness to system aware on Windows + giu.FixDPI() // Create the main window window = giu.NewMasterWindow("Picocrypt", 318, 479, giu.MasterWindowFlagsNotResizable) diff --git a/src/go.mod b/src/go.mod index ce91e65..f589a3b 100644 --- a/src/go.mod +++ b/src/go.mod @@ -6,7 +6,7 @@ require ( github.com/HACKERALERT/clipboard v0.1.5-0.20220507233423-cccec4a4226a github.com/HACKERALERT/crypto v0.0.0-20220508005928-a6d354b4bce5 github.com/HACKERALERT/dialog v0.0.0-20220508022504-af3bc34fe379 - github.com/HACKERALERT/giu v0.5.7-0.20220625033920-09d00499b7a0 + github.com/HACKERALERT/giu v0.5.7-0.20220904225735-82902a743aba github.com/HACKERALERT/imgui-go v1.12.1-0.20220625032501-ccba9a3ad6fa github.com/HACKERALERT/infectious v0.0.0-20220507232346-2b127b76a757 github.com/HACKERALERT/serpent v0.0.0-20210716182301-293b29869c66 diff --git a/src/go.sum b/src/go.sum index a5ba785..c951c19 100644 --- a/src/go.sum +++ b/src/go.sum @@ -4,8 +4,8 @@ github.com/HACKERALERT/crypto v0.0.0-20220508005928-a6d354b4bce5 h1:nTOuBrqZHfhy github.com/HACKERALERT/crypto v0.0.0-20220508005928-a6d354b4bce5/go.mod h1:wc+TkRIxPthhgcmH94G8okAtnodc6t+tlv+Q41TDj5s= github.com/HACKERALERT/dialog v0.0.0-20220508022504-af3bc34fe379 h1:GR92LbksZ8zdbzQHf2dTI7e7P8Mjbdi5mSmQv2SK2Uw= github.com/HACKERALERT/dialog v0.0.0-20220508022504-af3bc34fe379/go.mod h1:V0Gv8EvnwHTFk9TOZiHlYlXcUnVHoXJazNW0pVKZnkY= -github.com/HACKERALERT/giu v0.5.7-0.20220625033920-09d00499b7a0 h1:fifJATRJxy5a/vctxPs6LKaOu8kv4tO2XHgVgzWeO2A= -github.com/HACKERALERT/giu v0.5.7-0.20220625033920-09d00499b7a0/go.mod h1:xlfEv3JujiEB1Dukbw0lIgsFYMx/L0u5BwxEmSu/ixg= +github.com/HACKERALERT/giu v0.5.7-0.20220904225735-82902a743aba h1:1WDtHp81L4vJep3kjMf67/CbhJvPe1YsQFg7x4x0m30= +github.com/HACKERALERT/giu v0.5.7-0.20220904225735-82902a743aba/go.mod h1:xlfEv3JujiEB1Dukbw0lIgsFYMx/L0u5BwxEmSu/ixg= github.com/HACKERALERT/gl v0.0.0-20220507232930-73af36e130d3 h1:JMAOkmVuuJKjFAVeK+P7i3F/bVSCTU1UUmaxaYTYs9Q= github.com/HACKERALERT/gl v0.0.0-20220507232930-73af36e130d3/go.mod h1:ZUosVzfEKNGLMLk6aj9yo0FSAhWWsbTMjuzeIUXniB0= github.com/HACKERALERT/glfw/v3.3/glfw v0.0.0-20220507233141-2c5dd2490d18 h1:BjHTW61wldpYJa7Hc3o2w/jPtv5K8is2Z9R73ru0iU8=