Skip to content

Commit

Permalink
fix Linux FB .
Browse files Browse the repository at this point in the history
  • Loading branch information
lovyan03 committed Jul 25, 2024
1 parent d16721c commit 5e32d57
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/lgfx/v1/platforms/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ Original Source:

#include "arduino_default/common.hpp"

#elif __has_include(<SDL2/SDL.h>) || __has_include(<SDL.h>)
#elif (__has_include(<SDL2/SDL.h>) || __has_include(<SDL.h>)) && !defined(LGFX_LINUX_FB)

#include "sdl/common.hpp"

#elif __has_include(<opencv2/opencv.hpp>)
#elif __has_include(<opencv2/opencv.hpp>) && !defined(LGFX_LINUX_FB)

#include "opencv/common.hpp"

#elif defined (__linux__)
#elif defined (__linux__) && defined(LGFX_LINUX_FB)

#include "framebuffer/common.hpp"

Expand Down
2 changes: 1 addition & 1 deletion src/lgfx/v1/platforms/device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Original Source:

#include "arduino_default/Bus_SPI.hpp"

#elif __has_include(<SDL2/SDL.h>) || __has_include(<SDL.h>)
#elif (__has_include(<SDL2/SDL.h>) || __has_include(<SDL.h>)) && !defined(LGFX_LINUX_FB)

#include "sdl/Bus_I2C.hpp"
#include "sdl/Panel_sdl.hpp"
Expand Down
6 changes: 1 addition & 5 deletions src/lgfx/v1/platforms/framebuffer/Panel_fb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,11 @@ namespace lgfx
{
// unmap fb file from memory
munmap(_fbp, _screensize);
// reset the display mode
if (ioctl(_fbfd, FBIOPUT_VSCREENINFO, &_fix_info)) {
printf("Error re-setting variable information.\n");
}
// close fb file
close(_fbfd);

memset(&_fix_info, 0, sizeof(_fix_info));
memset(&_var_info, 0, sizeof(_fix_info));
memset(&_var_info, 0, sizeof(_var_info));
}

Panel_fb::Panel_fb(void) : Panel_Device(), _fbp(nullptr)
Expand Down

0 comments on commit 5e32d57

Please sign in to comment.