Skip to content

Commit

Permalink
demos/settings: move parse_args out of NUKLEAR ifdef
Browse files Browse the repository at this point in the history
In case demos are compiled, but the nuklear headers are not available,
compilation fails, because the implementation of parse_args function
is protected by the HAVE_NUKLEAR preprocessor macro.

To avoids this issue, move this implementation of this function outside
of this ifdef.

Signed-off-by: Gyorgy Sarvari <[email protected]>
  • Loading branch information
OldManYellsAtCloud authored and haasn committed Feb 16, 2025
1 parent 056b852 commit 8966ee9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions demos/settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
#define PL_BASENAME basename
#endif

#ifdef HAVE_NUKLEAR
#include "ui.h"

bool parse_args(struct plplay_args *args, int argc, char *argv[])
{
static struct option long_options[] = {
Expand Down Expand Up @@ -89,6 +86,9 @@ bool parse_args(struct plplay_args *args, int argc, char *argv[])
return false;
}

#ifdef HAVE_NUKLEAR
#include "ui.h"

static void add_hook(struct plplay *p, const struct pl_hook *hook, const char *path)
{
if (!hook)
Expand Down

0 comments on commit 8966ee9

Please sign in to comment.