Skip to content

Commit

Permalink
improve lcd mono
Browse files Browse the repository at this point in the history
  • Loading branch information
xianjimli committed Jan 8, 2025
1 parent 3aa4091 commit ac71d62
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions docs/changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 最新动态

2025/01/08
* 修改定义WITH_LCD_MONO宏的时候会链接到SDL的文件(感谢智明提供补丁)
2025/01/03
* 完善 bitmap API 注释(感谢朝泽提供补丁)
* 完善 text edit(感谢泽武提供补丁)
Expand Down
6 changes: 3 additions & 3 deletions src/lcd/lcd_mono.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "lcd/lcd_mono.h"
#include "base/system_info.h"

#ifdef WITH_LCD_MONO
#if defined(WITH_LCD_MONO) && defined(WITH_SDL)
#include "lcd/lcd_sdl2_mono.h"
#endif

Expand Down Expand Up @@ -168,7 +168,7 @@ static ret_t lcd_mono_end_frame(lcd_t* lcd) {
return RET_OK;
}

#ifdef WITH_LCD_MONO
#if defined(WITH_LCD_MONO) && defined(WITH_SDL)
static ret_t lcd_mono_resize(lcd_t* lcd, wh_t w, wh_t h, uint32_t line_length) {
lcd_mono_t* mono = (lcd_mono_t*)(lcd);
return_value_if_fail(mono != NULL, RET_BAD_PARAMS);
Expand Down Expand Up @@ -218,7 +218,7 @@ lcd_t* lcd_mono_create(wh_t w, wh_t h, lcd_flush_t flush, lcd_destroy_t on_destr
system_info_set_lcd_type(info, lcd->type);
system_info_set_device_pixel_ratio(info, 1);

#ifdef WITH_LCD_MONO
#if defined(WITH_LCD_MONO) && defined(WITH_SDL)
lcd->resize = lcd_mono_resize;
lcd->set_orientation = lcd_mono_set_orientation;
#endif
Expand Down

0 comments on commit ac71d62

Please sign in to comment.