From 0e5c37450644b5050a70bfe11773c3b677d4939e Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 14 Mar 2023 06:48:22 +0200 Subject: [PATCH] Stub code --- Core/Disk.cpp | 2 +- KConfig.cpp | 2 +- Recovery/RecoveryMain.cpp | 20 +++++++++++++++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/Core/Disk.cpp b/Core/Disk.cpp index c117da1..43e3902 100644 --- a/Core/Disk.cpp +++ b/Core/Disk.cpp @@ -143,7 +143,7 @@ namespace Disk drives.push_back(drive); } - + KernelAllocator.FreePages((void *)callback, TO_PAGES(sizeof(KernelCallback))); } diff --git a/KConfig.cpp b/KConfig.cpp index bf05d4f..62b4bdd 100644 --- a/KConfig.cpp +++ b/KConfig.cpp @@ -72,7 +72,7 @@ static struct cag_option ConfigOptions[] = { .value_name = "BOOL", .description = "Enable Interrupts On Crash. If enabled, the navigation keys will be enabled on crash"}, - {.identifier = 's', + {.identifier = 's', .access_letters = NULL, .access_name = "simd", .value_name = "BOOL", diff --git a/Recovery/RecoveryMain.cpp b/Recovery/RecoveryMain.cpp index 75a71b9..94c9c85 100644 --- a/Recovery/RecoveryMain.cpp +++ b/Recovery/RecoveryMain.cpp @@ -154,6 +154,13 @@ namespace Recovery void CV90() { ChangeVolume(90); } void CV100() { ChangeVolume(100); } + // void audio_dev_connected() { AudioFile = (char *)"/system/config/audio/media/dev_connected.mp3"; } + // void audio_dev_disconnected() { AudioFile = (char *)"/system/config/audio/media/dev_disconnected.mp3"; } + // void audio_dev_error() { AudioFile = (char *)"/system/config/audio/media/dev_error.mp3"; } + // void audio_error() { AudioFile = (char *)"/system/config/audio/media/error.mp3"; } + // void audio_notification() { AudioFile = (char *)"/system/config/audio/media/notification.mp3"; } + // void audio_warning() { AudioFile = (char *)"/system/config/audio/media/warning.mp3"; } + void KernelRecovery::RecoveryThread() { while (wdgDbgWin == nullptr || DbgWin == nullptr) @@ -198,6 +205,15 @@ namespace Recovery wdgDbgWin->CreateButton({275, 280, 25, 15}, "90%", (uintptr_t)CV90); wdgDbgWin->CreateButton({305, 280, 25, 15}, "100%", (uintptr_t)CV100); + + GraphicalUserInterface::Handle wdgDbgCurrentAudioLbl = wdgDbgWin->CreateLabel({5, 295, 0, 0}, "Current Audio: "); + // wdgDbgWin->CreateButton({5, 310, 85, 15}, "dev_connected.mp3", (uintptr_t)audio_dev_connected); + // wdgDbgWin->CreateButton({95, 310, 85, 15}, "dev_disconnected.mp3", (uintptr_t)audio_dev_disconnected); + // wdgDbgWin->CreateButton({185, 310, 85, 15}, "dev_error.mp3", (uintptr_t)audio_dev_error); + // wdgDbgWin->CreateButton({275, 310, 85, 15}, "error.mp3", (uintptr_t)audio_error); + // wdgDbgWin->CreateButton({365, 310, 85, 15}, "notification.mp3", (uintptr_t)audio_notification); + // wdgDbgWin->CreateButton({455, 310, 85, 15}, "warning.mp3", (uintptr_t)audio_warning); + DbgWin->AddWidget(wdgDbgWin); char TicksText[128]; @@ -221,6 +237,8 @@ namespace Recovery } sprintf(TicksText, "Debug - %ldx%ld", DbgWin->GetPosition().Width, DbgWin->GetPosition().Height); DbgWin->SetTitle(TicksText); + sprintf(TicksText, "Current Audio: %s", AudioFile); + wdgDbgWin->SetText(wdgDbgCurrentAudioLbl, TicksText); #ifdef DEBUG static int RefreshGUIDbgCounter = 0; @@ -289,7 +307,7 @@ namespace Recovery Rect DebugWindow; DebugWindow.Width = 460; - DebugWindow.Height = 305; + DebugWindow.Height = 315; DebugWindow.Left = 5; DebugWindow.Top = 25; DbgWin = new Window(gui, DebugWindow, "Debug");