Skip to content

Commit e6c8693

Browse files
MarkOatesSiegeLord
authored andcommitted
Add "al_is_native_dialog_addon_initialized"
1 parent 3e6285b commit e6c8693

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

addons/native_dialog/allegro5/allegro_native_dialog.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ typedef struct ALLEGRO_MENU_INFO {
5959
#define ALLEGRO_END_OF_MENU { NULL, 0, 0, NULL }
6060

6161
ALLEGRO_DIALOG_FUNC(bool, al_init_native_dialog_addon, (void));
62+
ALLEGRO_DIALOG_FUNC(bool, al_is_native_dialog_addon_initialized, (void));
6263
ALLEGRO_DIALOG_FUNC(void, al_shutdown_native_dialog_addon, (void));
6364

6465
ALLEGRO_DIALOG_FUNC(ALLEGRO_FILECHOOSER *, al_create_native_file_dialog, (char const *initial_path,

addons/native_dialog/dialog.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ bool al_init_native_dialog_addon(void)
2727
return true;
2828
}
2929

30+
/* Function: al_is_native_dialog_addon_initialized
31+
*/
32+
bool al_is_native_dialog_addon_initialized(void)
33+
{
34+
return inited_addon;
35+
}
36+
3037
/* Function: al_shutdown_native_dialog_addon
3138
*/
3239
void al_shutdown_native_dialog_addon(void)

docs/src/refman/native_dialog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ an error message if Allegro fails to initialise.
3131

3232
See also: [al_shutdown_native_dialog_addon]
3333

34+
## API: al_is_native_dialog_addon_initialized
35+
36+
Returns true if the native dialog addon is initialized, otherwise returns false.
37+
3438
## API: al_shutdown_native_dialog_addon
3539

3640
Shut down the native dialog addon.

0 commit comments

Comments
 (0)