mirror of
https://github.com/Xpl0itU/WiiUDownloader.git
synced 2025-05-27 13:34:36 -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 (
|
||||
"fmt"
|
||||
"time"
|
||||
"unsafe"
|
||||
|
||||
"github.com/gotk3/gotk3/gtk"
|
||||
|
@ -37,10 +38,13 @@ func DecryptContents(path string, progress *ProgressWindow, deleteEncryptedConte
|
|||
progress.bar.SetText("Decrypting...")
|
||||
|
||||
for progressInt := range progressChan {
|
||||
progress.bar.SetFraction(float64(progressInt) / 100)
|
||||
for gtk.EventsPending() {
|
||||
gtk.MainIteration()
|
||||
if progressInt > 0 {
|
||||
progress.bar.SetFraction(float64(progressInt) / 100)
|
||||
for gtk.EventsPending() {
|
||||
gtk.MainIteration()
|
||||
}
|
||||
}
|
||||
time.Sleep(time.Millisecond * 10)
|
||||
}
|
||||
|
||||
if err := <-errorChan; err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue