summaryrefslogtreecommitdiffhomepage
path: root/Private/Source
diff options
context:
space:
mode:
authoramlal <amlal@el-mahrouss-logic.com>2024-03-23 10:22:31 +0100
committeramlal <amlal@el-mahrouss-logic.com>2024-03-23 10:22:31 +0100
commit57834666259af373d19b560108ed7bb322b68adb (patch)
treefdf1d4fdced47b0ebf8c90d8f8d9f54e852ad75f /Private/Source
parent77bf7cab39fef40797e8832aaef91abbdf0098f5 (diff)
Kernel: PS2 mouse builtin works now.
- But doesnt draw at the exact position, we need to fix that. Signed-off-by: amlal <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Private/Source')
-rw-r--r--Private/Source/KernelCheck.cxx9
-rw-r--r--Private/Source/KernelHeap.cxx4
2 files changed, 9 insertions, 4 deletions
diff --git a/Private/Source/KernelCheck.cxx b/Private/Source/KernelCheck.cxx
index 40833a87..bf7ac939 100644
--- a/Private/Source/KernelCheck.cxx
+++ b/Private/Source/KernelCheck.cxx
@@ -69,6 +69,11 @@ void ke_stop(const HCore::Int &id) {
kcout << "*** WHAT: CATASROPHIC FAILURE! *** \r\n";
break;
}
+ case RUNTIME_CHECK_FAILED: {
+ kcout << "*** CAUSE: RUNTIME_CHECK_FAILED *** \r\n";
+ kcout << "*** WHAT: ASSERTION FAILED! *** \r\n";
+ break;
+ }
default: {
kcout << "*** CAUSE: RUNTIME_CHECK_GENERIC *** \r\n";
break;
@@ -86,8 +91,8 @@ void ke_stop(const HCore::Int &id) {
void ke_runtime_check(bool expr, const char *file, const char *line) {
if (!expr) {
#ifdef __DEBUG__
- kcout << "Krnl: File: " << file << "\n";
- kcout << "Krnl: Line: " << line << "\n";
+ kcout << "NewKernel: File: " << file << "\n";
+ kcout << "NewKernel: Line: " << line << "\n";
#endif // __DEBUG__
diff --git a/Private/Source/KernelHeap.cxx b/Private/Source/KernelHeap.cxx
index f5cb01da..03e5f250 100644
--- a/Private/Source/KernelHeap.cxx
+++ b/Private/Source/KernelHeap.cxx
@@ -66,7 +66,7 @@ Int32 ke_delete_ke_heap(VoidPtr ptr) {
if (kHeapCount < 1) return -kErrorInternal;
Detail::HeapInformationBlockPtr virtualAddress =
- reinterpret_cast<Detail::HeapInformationBlockPtr>(ptr -
+ reinterpret_cast<Detail::HeapInformationBlockPtr>((UIntPtr)ptr -
sizeof(Detail::HeapInformationBlock));
if (virtualAddress && virtualAddress->hMagic == kHeapMagic) {
@@ -98,7 +98,7 @@ Boolean ke_is_valid_ptr(VoidPtr ptr) {
if (ptr) {
Detail::HeapInformationBlockPtr virtualAddress =
- reinterpret_cast<Detail::HeapInformationBlockPtr>(ptr -
+ reinterpret_cast<Detail::HeapInformationBlockPtr>((UIntPtr)ptr -
sizeof(Detail::HeapInformationBlock));
if (virtualAddress->hPresent && virtualAddress->hMagic == kHeapMagic) {