MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / writeCMap

Function writeCMap

source/kernel/devs/devfb.cpp:294–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292}
293
294void writeCMap(KThread* thread, U32 address, struct fb_cmap* cmap) {
295 U32 i = thread->memory->readd(address);
296 U32 stop = thread->memory->readd(address+4)+i;
297 U32 red = thread->memory->readd(address+8);
298 U32 green = thread->memory->readd(address+12);
299 U32 blue = thread->memory->readd(address+16);
300
301 for (;i<stop;i++) {
302 cmap->red[i] = thread->memory->readw(red); red+=2;
303 cmap->green[i] = thread->memory->readw(green); green+=2;
304 cmap->blue[i] = thread->memory->readw(blue); blue+=2;
305 }
306 paletteChanged = 1;
307}
308
309void fbSetupScreenForOpenGL(int width, int height, int depth) {
310 destroySDL2();

Callers 1

ioctlMethod · 0.85

Calls 2

readdMethod · 0.45
readwMethod · 0.45

Tested by

no test coverage detected