do a realloc equivalent for MemoryBlock class and fix the = new MemoryBlock problem if it is called again with a bigger size at the same offset.
the issue I was facing when trying to change VBE BGA modes:
Msg: Text from kernel: Creating a new bitmap from saved bitmap creates same bitmap
01:47:27.490766 Msg: Text from kernel: Testing Canvas with mode 1024x768@32
01:47:27.904688 Msg: Text from kernel: Test of Canvas with mode 1024x768@32 executed successfully
01:47:27.952705 Msg: Text from kernel: Testing Canvas with mode 800x600@32
01:47:28.759647 Msg: Text from kernel: Test of Canvas with mode 800x600@32 executed successfully
01:47:28.806602 Msg: Text from kernel: Testing Canvas with mode 1024x768@32
01:47:29.740571 Msg: Text from kernel: Test of Canvas with mode 1024x768@32 executed successfully
01:47:29.788581 Msg: Text from kernel: Testing Canvas with mode 1280x1024@32
01:47:30.075635 Msg: Text from kernel: Exception occurred: Specified argument was out of the range of valid values.
When the first mode was enabled (1024x768@32) a MemoryBlock of size 1024x768x4 was created. But for some reasons it blocks here. Once a MemoryBlock of a specific offset is created, it cannot be resized with higher size by calling again = new MemoryBlock. Indeed in the tests, it creates a Canva for each mode, and initialize the VBE driver each time and do each time a
do a realloc equivalent for MemoryBlock class and fix the
= new MemoryBlock
problem if it is called again with a bigger size at the same offset.the issue I was facing when trying to change VBE BGA modes:
When the first mode was enabled (1024x768@32) a MemoryBlock of size 1024x768x4 was created. But for some reasons it blocks here. Once a MemoryBlock of a specific offset is created, it cannot be resized with higher size by calling again
= new MemoryBlock
. Indeed in the tests, it creates a Canva for each mode, and initialize the VBE driver each time and do each time aThe "fix" I mean hijack was just to create a bigger MemoryBlock which can include all modes (1920x1080x4):