diff --git a/GeckoLoader.py b/GeckoLoader.py index 2e8ebe2..85e20ec 100644 --- a/GeckoLoader.py +++ b/GeckoLoader.py @@ -660,6 +660,7 @@ class GUI(object): self.ui.dolTextBox.textChanged.connect(lambda: self.ui.set_edit_fields()) self.ui.gctFolderTextBox.textChanged.connect(lambda: self.ui.set_edit_fields()) self.ui.gctFileTextBox.textChanged.connect(lambda: self.ui.set_edit_fields()) + self.ui.destTextBox.textChanged.connect(lambda: self.ui.set_edit_fields()) self.ui.allocLineEdit.textChanged.connect(lambda: self._enforce_mask(self.ui.allocLineEdit, 0xFFFFFC)) @@ -761,14 +762,14 @@ class GUI(object): with redirect_stdout(_outpipe), redirect_stderr(_errpipe): try: self.cli._exec(args, tmpdir=TMPDIR) - except SystemExit: + except (SystemExit, Exception): _status = False else: _status = True if _status is False: _msg = f"Arguments failed! GeckoLoader couldn't execute the job\n\nArgs: {args.__repr__()}\n\nstderr: {self._remove_ansi(_errpipe.getvalue())}" - self.ui.responses.appendPlainText(_msg.strip() + "\n") + self.ui.responses.appendPlainText(_outpipe.getvalue() + "\n\n" + _msg.strip() + "\n") else: for line in self._remove_ansi(_outpipe.getvalue()).split("\n"): _msg += line.lstrip() + "\n" diff --git a/kernel.py b/kernel.py index 297cdba..9446d7d 100644 --- a/kernel.py +++ b/kernel.py @@ -435,6 +435,9 @@ class KernelLoader(object): write_uint32(self._rawData, CodeHandler.encrypt_key(_key)) + if _lowerAddr + gpModInfoOffset > 0xFFFF: + _lowerAddr -= 0x10000 + self._gpModDataList = (gpModUpperAddr, gpModInfoOffset) self._gpKeyAddrList = (gpKeyUpperAddr, gpKeyOffset) diff --git a/main_ui.py b/main_ui.py index 34005f2..09eb489 100644 --- a/main_ui.py +++ b/main_ui.py @@ -655,9 +655,14 @@ class MainWindow(QtWidgets.QMainWindow): for item in attributes: item = getattr(self, item) if isinstance(item, QtWidgets.QLineEdit): + strlength = len(item.text()) + cursorPos = item.cursorPosition() item.setText(item.text().lstrip()) + item.setCursorPosition(cursorPos - (strlength - len(item.text()))) elif isinstance(item, QtWidgets.QPlainTextEdit): + sliderPos = item.verticalScrollBar().sliderPosition() item.setPlainText(item.toPlainText().lstrip()) + item.verticalScrollBar().setSliderPosition(sliderPos) def set_edit_fields(self): self.filesLabel.setEnabled(True)