hex007 / freej2me

A free J2ME emulator with libretro, awt and sdl2 frontends.
Other
469 stars 72 forks source link

Fix for #122 #123

Closed Nokia64 closed 2 years ago

Nokia64 commented 2 years ago

Tiny fix for issue #122, calls to Graphics.translate(int x, int y) may have effects over the clip area values but they weren't being updated on FreeJ2ME's side causing issues on some games relying on reading back these values

EDIT: After testing some more games, I've noticed the first fix could cause a NullPointerException since Graphics2D.getClipBounds() may return null if the clip area had never been set. Added another commit on top, which instead updates the variables manually. Also the width and height never change so there's no need to update them

recompileorg commented 2 years ago

This is great!

I know how much work it can take to work out a simple fix like this. That's for all the hard work you put in to this project. It is very much appreciated.