| 292 | } |
| 293 | |
| 294 | void 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 | |
| 309 | void fbSetupScreenForOpenGL(int width, int height, int depth) { |
| 310 | destroySDL2(); |