mirror of
https://github.com/Xpl0itU/WiiUDownloader.git
synced 2025-05-29 22:45:17 -04:00
Fix some decryption crashes
This commit is contained in:
parent
cb8a63a0c6
commit
305caf35f9
1 changed files with 7 additions and 3 deletions
|
@ -15,6 +15,7 @@ extern void callProgressCallback(int progress);
|
||||||
import "C"
|
import "C"
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"time"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"github.com/gotk3/gotk3/gtk"
|
"github.com/gotk3/gotk3/gtk"
|
||||||
|
@ -37,10 +38,13 @@ func DecryptContents(path string, progress *ProgressWindow, deleteEncryptedConte
|
||||||
progress.bar.SetText("Decrypting...")
|
progress.bar.SetText("Decrypting...")
|
||||||
|
|
||||||
for progressInt := range progressChan {
|
for progressInt := range progressChan {
|
||||||
progress.bar.SetFraction(float64(progressInt) / 100)
|
if progressInt > 0 {
|
||||||
for gtk.EventsPending() {
|
progress.bar.SetFraction(float64(progressInt) / 100)
|
||||||
gtk.MainIteration()
|
for gtk.EventsPending() {
|
||||||
|
gtk.MainIteration()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
time.Sleep(time.Millisecond * 10)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := <-errorChan; err != nil {
|
if err := <-errorChan; err != nil {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue