Skip to content

Commit 7c11b3c

Browse files
committed
Several functions in :main only exist on Windows but were being bound (and failing) on all systems.
1 parent 4cf852e commit 7c11b3c

3 files changed

Lines changed: 18 additions & 14 deletions

File tree

Changes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- Several functions in `:main` only exist on Windows but were being bound (and failing) on all systems.
13+
1014
## [v0.0.3] - 2025-12-14
1115

1216
### Changed

cpanfile

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
requires 'Affix', 'v1.0.2';
1+
requires 'Affix', 'v1.0.2';
22
requires 'Alien::SDL3', 'v2.24.0';
33
requires 'Carp';
44
requires 'Data::Dump';
55
requires 'perl', 'v5.40.0';
6-
76
on configure => sub {
87
requires 'CPAN::Meta';
98
requires 'CPAN::Requirements::Dynamic';
@@ -15,23 +14,20 @@ on configure => sub {
1514
requires 'File::Path';
1615
requires 'File::Spec::Functions';
1716
requires 'Getopt::Long', '2.36';
18-
requires 'JSON::PP', '2';
19-
requires 'Path::Tiny', '0.144';
17+
requires 'JSON::PP', '2';
18+
requires 'Path::Tiny', '0.144';
2019
};
21-
2220
on build => sub {
23-
requires 'Affix', 'v1.0.2';
21+
requires 'Affix', 'v1.0.2';
2422
requires 'Alien::SDL3', 'v2.24.0';
2523
};
26-
2724
on test => sub {
2825
requires 'IPC::Cmd';
2926
requires 'TAP::Harness::Env';
3027
requires 'Test2::Plugin::UTF8';
3128
requires 'Test2::Tools::Compare';
3229
requires 'Test2::V0';
3330
};
34-
3531
on develop => sub {
3632
requires 'Code::TidyAll';
3733
requires 'Code::TidyAll::Plugin::ClangFormat';
@@ -45,9 +41,9 @@ on develop => sub {
4541
requires 'Software::License::Artistic_2_0';
4642
requires 'Test::CPAN::Meta';
4743
requires 'Test::MinimumVersion::Fast', '0.04';
48-
requires 'Test::PAUSE::Permissions', '0.07';
49-
requires 'Test::Pod', '1.41';
50-
requires 'Test::Spellunker', 'v0.2.7';
44+
requires 'Test::PAUSE::Permissions', '0.07';
45+
requires 'Test::Pod', '1.41';
46+
requires 'Test::Spellunker', 'v0.2.7';
5147
requires 'Version::Next';
5248
recommends 'App::mii', 'v1.0.0';
5349
recommends 'CPAN::Uploader';

lib/SDL3.pm

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3369,9 +3369,13 @@ See F<eg/hello_world.pl> for an example and L<SDL3: CategoryMain|https://wiki.li
33693369
SDL_EnterAppMainCallbacks =>
33703370
[ Int, Pointer [String], SDL_AppInit_func(), SDL_AppIterate_func(), SDL_AppEvent_func(), SDL_AppQuit_func() ],
33713371
Int;
3372-
_affix_and_export SDL_RegisterApp => [ String, UInt32, Pointer [Void] ], Bool;
3373-
_affix_and_export SDL_UnregisterApp => [], Void;
3374-
_affix_and_export SDL_GDKSuspendComplete => [], Void;
3372+
if ( $^O eq 'MSWin32' ) {
3373+
_affix_and_export SDL_RegisterApp => [ String, UInt32, Pointer [Void] ], Bool;
3374+
_affix_and_export SDL_UnregisterApp => [], Void;
3375+
_affix_and_export SDL_GDKRunApp => [], Void;
3376+
_affix_and_export SDL_GDKRunApp => [ SDL_main_func(), Pointer [Void] ], Int;
3377+
_affix_and_export SDL_GDKSuspendComplete => [], Void;
3378+
}
33753379
}
33763380

33773381
=head3 C<:messagebox> - Message Boxes

0 commit comments

Comments
 (0)