Skip to content

Commit 6401861

Browse files
committed
fix namespace collision
1 parent 986c8f9 commit 6401861

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

src/firefly.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,21 @@ DPad4 pad_to_dpad4(Pad self)
7070
}
7171
if (y > 300 && y > absX)
7272
{
73-
return UP;
73+
return DPAD4_UP;
7474
}
7575
if (y < -300 && -y > absX)
7676
{
77-
return DOWN;
77+
return DPAD4_DOWN;
7878
}
7979
if (x > 300 && x > absY)
8080
{
81-
return RIGHT;
81+
return DPAD4_RIGHT;
8282
}
8383
if (x < -300 && -x > absY)
8484
{
85-
return LEFT;
85+
return DPAD4_LEFT;
8686
}
87-
return NONE;
87+
return DPAD4_NONE;
8888
}
8989

9090
// -- GRAPHICS -- //
@@ -365,6 +365,11 @@ Buffer get_name(Peer p, Buffer buf)
365365
return name;
366366
}
367367

368+
Color _parseColor(uint32_t c)
369+
{
370+
return (Color)(c & 0xf + 1);
371+
}
372+
368373
/// @brief Get system settings.
369374
Settings get_settings(Peer p)
370375
{
@@ -390,11 +395,6 @@ Settings get_settings(Peer p)
390395
return settings;
391396
}
392397

393-
Color _parseColor(uint32_t c)
394-
{
395-
return (Color)(c & 0xf + 1);
396-
}
397-
398398
/// @brief Ask the runtime to restart the app after the current update iteration.
399399
void restart()
400400
{

src/firefly.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,11 @@ typedef struct DPad8 DPad8;
216216

217217
enum DPad4
218218
{
219-
NONE = 0,
220-
LEFT = 1,
221-
RIGHT = 2,
222-
UP = 3,
223-
DOWN = 4,
219+
DPAD4_NONE = 0,
220+
DPAD4_LEFT = 1,
221+
DPAD4_RIGHT = 2,
222+
DPAD4_UP = 3,
223+
DPAD4_DOWN = 4,
224224
};
225225
typedef enum DPad4 DPad4;
226226

0 commit comments

Comments
 (0)