mirror of
https://github.com/NeoFlock/neonucleus.git
synced 2025-09-24 09:03:32 +02:00
sick bugfix bro
This commit is contained in:
parent
0961fc0ceb
commit
68e0374697
@ -221,7 +221,8 @@ function tty.keyboard()
|
||||
-- changes to this design should avoid this on every key hit
|
||||
|
||||
-- this is expensive (slow!)
|
||||
window.keyboard = component.invoke(screen, "getKeyboards")[1] or system_keyboard
|
||||
debugprint("screen", type(screen), string.format("%q", screen))
|
||||
window.keyboard = assert(component.invoke(screen, "getKeyboards"))[1] or system_keyboard
|
||||
end
|
||||
|
||||
return window.keyboard
|
||||
|
@ -16,3 +16,25 @@ boot/91_gpu.lua:14: attempt to call a nil value (field 'getDepth')
|
||||
boot/91_gpu.lua:14: attempt to call a nil value (field 'getDepth')
|
||||
boot/91_gpu.lua:14: attempt to call a nil value (field 'getDepth')
|
||||
boot/91_gpu.lua:14: attempt to call a nil value (field 'getDepth')
|
||||
boot/91_gpu.lua:14: attempt to call a nil value (field 'getDepth')
|
||||
boot/91_gpu.lua:14: attempt to call a nil value (field 'getDepth')
|
||||
boot/91_gpu.lua:14: attempt to call a nil value (field 'getDepth')
|
||||
boot/91_gpu.lua:14: attempt to call a nil value (field 'getDepth')
|
||||
boot/91_gpu.lua:14: attempt to call a nil value (field 'getDepth')
|
||||
boot/91_gpu.lua:14: attempt to call a nil value (field 'getDepth')
|
||||
boot/91_gpu.lua:14: attempt to call a nil value (field 'getDepth')
|
||||
boot/91_gpu.lua:14: attempt to call a nil value (field 'getDepth')
|
||||
boot/91_gpu.lua:14: attempt to call a nil value (field 'getDepth')
|
||||
boot/91_gpu.lua:14: attempt to call a nil value (field 'getDepth')
|
||||
boot/91_gpu.lua:14: attempt to call a nil value (field 'getDepth')
|
||||
boot/91_gpu.lua:14: attempt to call a nil value (field 'getDepth')
|
||||
boot/91_gpu.lua:14: attempt to call a nil value (field 'getDepth')
|
||||
boot/91_gpu.lua:14: attempt to call a nil value (field 'getDepth')
|
||||
boot/91_gpu.lua:14: attempt to call a nil value (field 'getDepth')
|
||||
boot/91_gpu.lua:14: attempt to call a nil value (field 'getDepth')
|
||||
boot/91_gpu.lua:14: attempt to call a nil value (field 'getDepth')
|
||||
boot/91_gpu.lua:14: attempt to call a nil value (field 'getDepth')
|
||||
boot/91_gpu.lua:14: attempt to call a nil value (field 'getDepth')
|
||||
boot/91_gpu.lua:14: attempt to call a nil value (field 'getDepth')
|
||||
boot/91_gpu.lua:14: attempt to call a nil value (field 'getDepth')
|
||||
boot/91_gpu.lua:14: attempt to call a nil value (field 'getDepth')
|
||||
|
@ -174,7 +174,7 @@ void nni_gpu_get(nni_gpu *gpu, void *_, nn_component *component, nn_computer *co
|
||||
|
||||
void nni_gpu_getScreen(nni_gpu *gpu, void *_, nn_component *component, nn_computer *computer) {
|
||||
if(gpu->screenAddress == NULL) return;
|
||||
nn_return_string(computer, gpu->screenAddress, 0);
|
||||
nn_return_string(computer, gpu->screenAddress, strlen(gpu->screenAddress));
|
||||
}
|
||||
|
||||
void nni_gpu_maxResolution(nni_gpu *gpu, void *_, nn_component *component, nn_computer *computer) {
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "screen.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
nn_screen *nn_newScreen(nn_Alloc *alloc, int maxWidth, int maxHeight, int maxDepth, int editableColors, int paletteColors) {
|
||||
@ -87,7 +88,9 @@ void nn_setAspectRatio(nn_screen *screen, int width, int height) {
|
||||
|
||||
void nn_addKeyboard(nn_screen *screen, nn_address address) {
|
||||
if(screen->keyboardCount == NN_MAX_SCREEN_KEYBOARDS) return;
|
||||
screen->keyboards[screen->keyboardCount++] = nn_strdup(&screen->alloc, address);
|
||||
char *kb = nn_strdup(&screen->alloc, address);
|
||||
if(kb == NULL) return;
|
||||
screen->keyboards[screen->keyboardCount++] = kb;
|
||||
}
|
||||
|
||||
void nn_removeKeyboard(nn_screen *screen, nn_address address) {
|
||||
|
@ -138,8 +138,9 @@ void nn_deleteComputer(nn_computer *computer) {
|
||||
computer->arch->teardown(computer, computer->archState, computer->arch->userdata);
|
||||
nn_deleteGuard(a, computer->lock);
|
||||
nn_deallocStr(a, computer->address);
|
||||
nn_deallocStr(a, computer->tmpAddress);
|
||||
nn_dealloc(a, computer->components, sizeof(nn_component) * computer->componentCap);
|
||||
nn_dealloc(a, computer->components, sizeof(nn_computer));
|
||||
nn_dealloc(a, computer, sizeof(nn_computer));
|
||||
}
|
||||
|
||||
const char *nn_pushSignal(nn_computer *computer, nn_value *values, size_t len) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user