Storing base pixels ptr for freeing later

This commit is contained in:
SergioMartin86 2024-02-24 06:37:09 +00:00
parent 5fec4ec07c
commit d487148444
1 changed files with 9 additions and 0 deletions

View File

@ -253,6 +253,7 @@ class Emu
void clear_sound_buf();
void fade_samples(blip_sample_t *, int size, int step);
void* pixels_base_ptr;
char *host_pixels;
int host_palette_size;
frame_t single_frame;
@ -269,10 +270,18 @@ class Emu
public:
void SaveAudioBufferState();
void RestoreAudioBufferState();
inline void* get_pixels_base_ptr()
{
return pixels_base_ptr;
}
};
inline void Emu::set_pixels(void *p, long n)
{
pixels_base_ptr = p;
host_pixels = (char *)p + n;
emu.ppu.host_row_bytes = n;
}