Skip to content

Commit

Permalink
Optimize setenv for native build
Browse files Browse the repository at this point in the history
  • Loading branch information
lida2003 committed Nov 28, 2024
1 parent 58a07d6 commit a4ff7f6
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions osd/util/Render_x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,11 @@ int Init_x86(uint16_t *width, uint16_t *height) {
#ifdef _DEBUG_x86
forcefullscreen=false;
#endif


#ifdef _x86
if (getenv("DISPLAY") == NULL) {
/*
* Use default display screen, especially launch from console
* ToDo: x86 linux should implement this code also, test needed.
*/
setenv("DISPLAY", ":0", 1);
}
setenv("DISPLAY", ":0", 0);
#endif



display = XOpenDisplay(NULL);
if (!display) {
fprintf(stderr, "Cannot open display\n");
Expand Down

0 comments on commit a4ff7f6

Please sign in to comment.