Skip to content

Commit b046ab6

Browse files
committed
use wp_get_rect internally
1 parent 6f3ed51 commit b046ab6

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/weebp.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@
210210

211211
#define WP_VERSION_MAJOR 1 /* non-backwards-compatible changes */
212212
#define WP_VERSION_MINOR 3 /* backwards compatible api changes */
213-
#define WP_VERSION_PATCH 0 /* backwards-compatible changes */
213+
#define WP_VERSION_PATCH 1 /* backwards-compatible changes */
214214

215215
#define STRINGIFY_(x) #x
216216
#define STRINGIFY(x) STRINGIFY_(x)
@@ -805,10 +805,9 @@ int wp_fullscreen(wnd_t wnd)
805805
{
806806
HMONITOR mon;
807807
MONITORINFO mi;
808-
RECT current_rect;
808+
rect_t current_rect;
809809

810-
if (!GetWindowRect(wnd, &current_rect)) {
811-
wp_err("GetWindowRect failed, GLE=%08X", GetLastError());
810+
if (wp_get_rect(wnd, &current_rect)) {
812811
return 1;
813812
}
814813

@@ -834,10 +833,9 @@ int wp_fullscreen(wnd_t wnd)
834833
WEEBAPI
835834
int wp_panoramic(wnd_t wnd)
836835
{
837-
RECT r;
836+
rect_t r;
838837

839-
if (!GetWindowRect(wp_id(), &r)) {
840-
wp_err("GetWindowRect failed, GLE=%08X", GetLastError());
838+
if (wp_get_rect(wp_id(), &r)) {
841839
return 1;
842840
}
843841

0 commit comments

Comments
 (0)