Skip to content

Commit 0bafe97

Browse files
committed
Fix build with DGL_DEBUG_EVENTS
Signed-off-by: falkTX <falktx@falktx.com>
1 parent 576b507 commit 0bafe97

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

dgl/src/WindowPrivateData.cpp

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -579,11 +579,11 @@ void Window::PrivateData::runAsModal(const bool blockWait)
579579
// -----------------------------------------------------------------------
580580
// pugl events
581581

582-
void Window::PrivateData::onPuglConfigure(const double width, const double height)
582+
void Window::PrivateData::onPuglConfigure(const uint width, const uint height)
583583
{
584584
DISTRHO_SAFE_ASSERT_INT2_RETURN(width > 1 && height > 1, width, height,);
585585

586-
DGL_DBGp("PUGL: onReshape : %f %f\n", width, height);
586+
DGL_DBGp("PUGL: onReshape : %d %d\n", width, height);
587587

588588
if (autoScaling)
589589
{
@@ -1188,25 +1188,21 @@ static int printEvent(const PuglEvent* event, const char* prefix, const bool ver
11881188

11891189
if (verbose) {
11901190
switch (event->type) {
1191-
case PUGL_CREATE:
1192-
return fprintf(stderr, "%sCreate\n", prefix);
1193-
case PUGL_DESTROY:
1194-
return fprintf(stderr, "%sDestroy\n", prefix);
1195-
case PUGL_MAP:
1196-
return fprintf(stderr, "%sMap\n", prefix);
1197-
case PUGL_UNMAP:
1198-
return fprintf(stderr, "%sUnmap\n", prefix);
1199-
case PUGL_UPDATE:
1200-
return 0; // fprintf(stderr, "%sUpdate\n", prefix);
1191+
case PUGL_REALIZE:
1192+
return PRINT("%sRealize\n", prefix);
1193+
case PUGL_UNREALIZE:
1194+
return PRINT("%sUnrealize\n", prefix);
12011195
case PUGL_CONFIGURE:
1202-
return PRINT("%sConfigure " PFMT " " PFMT "\n",
1196+
return PRINT("%sConfigure %d %d %d %d\n",
12031197
prefix,
12041198
event->configure.x,
12051199
event->configure.y,
12061200
event->configure.width,
12071201
event->configure.height);
1202+
case PUGL_UPDATE:
1203+
return 0; // fprintf(stderr, "%sUpdate\n", prefix);
12081204
case PUGL_EXPOSE:
1209-
return PRINT("%sExpose " PFMT " " PFMT "\n",
1205+
return PRINT("%sExpose %d %d %d %d\n",
12101206
prefix,
12111207
event->expose.x,
12121208
event->expose.y,

dgl/src/WindowPrivateData.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ struct Window::PrivateData : IdleCallback {
181181
void runAsModal(bool blockWait);
182182

183183
// pugl events
184-
void onPuglConfigure(double width, double height);
184+
void onPuglConfigure(uint width, uint height);
185185
void onPuglExpose();
186186
void onPuglClose();
187187
void onPuglFocus(bool focus, CrossingMode mode);

0 commit comments

Comments
 (0)