- [NEW] Afegit clipboard al backend
- [NEW] surfaces ara usa un vector dinàmic - [FIX] Ajustades dereferenciacions per a arreglar la caiguda de rendiment
This commit is contained in:
@@ -65,7 +65,9 @@ namespace backend
|
||||
uint32_t *pixels;
|
||||
int pitch;
|
||||
SDL_LockTexture(tex_back, NULL, (void**)&pixels, &pitch);
|
||||
for (uint32_t i=0;i<mini::surf::state.screen_surface->size;++i) pixels[i] = mini::pal::palette[mini::surf::state.screen_surface->p[i]];
|
||||
auto &s = mini::surf::state.surfaces[SCREEN];
|
||||
uint8_t *p = s.p;
|
||||
for (uint32_t i=0;i<s.size;++i) pixels[i] = mini::pal::palette[p[i]];
|
||||
SDL_UnlockTexture(tex_back);
|
||||
SDL_RenderTexture(renderer, tex_back, NULL, NULL); //NEW
|
||||
|
||||
|
||||
Reference in New Issue
Block a user