- *w = handler->pd.width;
- *h = handler->pd.height;
-
- switch (handler->pd.type) {
- case _PD_TYPE_BUFFER:
- case _PD_TYPE_SCRIPT:
- if (!handler->is_pd_created)
- DbgPrint("Buffer is not created yet [%dx%d]\n", *w, *h);
- break;
- default:
- break;
+ if (!handler->is_pd_created) {
+ DbgPrint("Buffer is not created yet [%dx%d]\n", *w, *h);
+ *w = handler->pd.default_width;
+ *h = handler->pd.default_height;
+ } else {
+ *w = handler->pd.width;
+ *h = handler->pd.height;