Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CYD white background fix #49

Open
DynaMight1124 opened this issue Jul 4, 2024 · 1 comment
Open

CYD white background fix #49

DynaMight1124 opened this issue Jul 4, 2024 · 1 comment

Comments

@DynaMight1124
Copy link

Hi

Firstly, thanks for the amazing project. I have recently built a small arcade with this code and its amazing!

I also have a CYD2USB with a ST7789 display, however when I flashed I had a white background rather than black. I know from other projects I've used on this device that it can do that with this display.

I have managed to correct the issue, I'm hoping my below fixes can be added and hoping I dont need to submit a PR because I have no idea how to do that :)

So anyway my fixes involve both config.h and video.cpp.

In config.h I added this line to line 80:
// #define TFT_INV_OFF // some CYD screens need inversion off if you have a white background rather than black
Normal behaviour should probably be commented so it doesn't affect other ST7789 users.

In video.cpp I deleted line 104 and added:
#ifdef TFT_INV_OFF
0x20, 0, // INV OFF
#else
0x21, 0, // INV ON
#endif

I tested the line in config.h commented out and in and it had the correct effects on the display indicating the code is working e.g. white and black backgrounds.

Thanks

@AnDyC420
Copy link

AnDyC420 commented Dec 5, 2024

Thank you for posting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants