Guys I'm about to finish a chip8 emulator written in C++ on c4droid ( a C11++ and SDL IDE for android)
So far a lot of things are working such as counters, renderer, timers and input handling, but I'm getting a strange behavior while running it.
At first it runs at a good speed, but slows down over time.
Things I have tried:
1) Looking for objects created while on the main loop
2) Freeing all surfaces as soon as i'm done with them
My rendering function consist of just drawing SDL_Rects on the screen. And I'm only updating the screen every 10 opcodes
I'm not doing any Clear rendering in between updates, I also create button objects once per activations, and the buttons get filled and outline draw on demand... can multiple fillrects/draw rects be really slowing down the emulator that much?
Thank you in advance guys
**Freaking SDL_TTF was leaking all over the place. Fixed moving up to gameboy
So far a lot of things are working such as counters, renderer, timers and input handling, but I'm getting a strange behavior while running it.
At first it runs at a good speed, but slows down over time.
Things I have tried:
1) Looking for objects created while on the main loop
2) Freeing all surfaces as soon as i'm done with them
My rendering function consist of just drawing SDL_Rects on the screen. And I'm only updating the screen every 10 opcodes
I'm not doing any Clear rendering in between updates, I also create button objects once per activations, and the buttons get filled and outline draw on demand... can multiple fillrects/draw rects be really slowing down the emulator that much?
Thank you in advance guys
**Freaking SDL_TTF was leaking all over the place. Fixed moving up to gameboy
Last edited: