Skip to content
This repository was archived by the owner on Feb 27, 2023. It is now read-only.

Commit 9602136

Browse files
committed
Disable switching to current display mode. Fix linux version
string.
1 parent 4907029 commit 9602136

File tree

5 files changed

+24
-8
lines changed

5 files changed

+24
-8
lines changed

BUILDME.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ cat rpi-firmware-head >> "../output/"BUILT-"$(date +"%Y-%m-%d")"
4747
cd ..
4848

4949
clear
50-
echo "Build complete. Copy files in \'output\' directory onto a clean FAT formatted SD card to use."
50+
echo "Build complete. Copy files in 'output' directory onto a clean FAT formatted SD card to use."

buildroot/kernelconfig-recovery

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CONFIG_EXPERIMENTAL=y
2-
CONFIG_LOCALVERSION="rescue"
2+
CONFIG_LOCALVERSION="-rescue"
33
# CONFIG_LOCALVERSION_AUTO is not set
44
CONFIG_SYSVIPC=y
55
CONFIG_POSIX_MQUEUE=y

output

recovery/mainwindow.cpp

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
/* Flag to keep track wheter or not we already repartitioned. */
3939
bool MainWindow::_partInited = false;
4040

41+
/* Flag to keep track of current display mode. */
42+
int MainWindow::_currentMode = 0;
43+
4144
/* Which ListItem (if any) points to the recommended image. */
4245
QListWidgetItem *recommendedItem = NULL;
4346

@@ -405,17 +408,29 @@ bool MainWindow::eventFilter(QObject *, QEvent *event)
405408
// experimentally by using keys 1-4. NOOBS will default to using HDMI preferred mode.
406409

407410
// HDMI preferred mode
408-
if (keyEvent->key() == Qt::Key_1)
411+
if (keyEvent->key() == Qt::Key_1 && _currentMode != 0)
412+
{
409413
displayMode("-p", tr("HDMI preferred mode"));
414+
_currentMode = 0;
415+
}
410416
// HDMI safe mode
411-
if (keyEvent->key() == Qt::Key_2)
417+
if (keyEvent->key() == Qt::Key_2 && _currentMode != 1)
418+
{
412419
displayMode("-e \'DMT 4\'", tr("HDMI safe mode"));
420+
_currentMode = 1;
421+
}
413422
// Composite PAL
414-
if (keyEvent->key() == Qt::Key_3)
423+
if (keyEvent->key() == Qt::Key_3 && _currentMode != 2)
424+
{
415425
displayMode("-c \'NTSC 4:3\'", tr("composite PAL mode"));
416-
// Composite NTSC
417-
if (keyEvent->key() == Qt::Key_4)
426+
_currentMode = 2;
427+
}
428+
// Composite NTSC
429+
if (keyEvent->key() == Qt::Key_4 && _currentMode != 3)
430+
{
418431
displayMode("-c \'PAL 4:3\'", tr("composite NTSC mode"));
432+
_currentMode = 3;
433+
}
419434
// Catch Return key to trigger OS install
420435
if (keyEvent->key() == Qt::Key_Return)
421436
on_actionWrite_image_to_disk_triggered();

recovery/mainwindow.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class MainWindow : public QMainWindow
3636
int _kcpos;
3737
bool _silent, _allowSilent;
3838
static bool _partInited;
39+
static int _currentMode;
3940
QString *_currentLang;
4041
QSplashScreen *_splash;
4142
LanguageDialog *_ld;

0 commit comments

Comments
 (0)