mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 19:18:53 +08:00
improve native_window_sdl_resize
This commit is contained in:
parent
68504e4ec6
commit
2e6d54d7d4
@ -88,6 +88,12 @@ static ret_t native_window_sdl_resize(native_window_t* win, wh_t w, wh_t h) {
|
||||
|
||||
#if !defined(ANDROID) && !defined(IOS)
|
||||
if (system_info()->lcd_orientation == LCD_ORIENTATION_0 && (w != info.w || h != info.h)) {
|
||||
|
||||
#ifdef WIN32
|
||||
w = w * win->ratio;
|
||||
h = h * win->ratio;
|
||||
#endif/*WIN32*/
|
||||
|
||||
SDL_SetWindowSize(sdl->window, w, h);
|
||||
}
|
||||
#endif /*ANDROID*/
|
||||
|
@ -41,6 +41,7 @@ static ret_t ui_builder_default_on_widget_start(ui_builder_t* b, const widget_de
|
||||
if (widget == NULL) {
|
||||
log_debug("%s: not supported type %s\n", __FUNCTION__, type);
|
||||
assert(!"not supported");
|
||||
return RET_FAIL;
|
||||
}
|
||||
|
||||
b->widget = widget;
|
||||
|
Loading…
Reference in New Issue
Block a user