Compare commits

...

685 commits
A1 ... master

Author SHA1 Message Date
Mary Guillemard d50837c46b
Update version to 2.30.0
Forgot to increment it before release oh well...
2024-02-06 23:39:55 +01:00
github-actions[bot] caa502a393
Update linux-arm64 SDL binaries (#158)
Co-authored-by: marysaka <marysaka@users.noreply.github.com>
2024-02-06 23:19:34 +01:00
github-actions[bot] 71ec99d676
Update osx-arm64 SDL binaries (#157)
Co-authored-by: marysaka <marysaka@users.noreply.github.com>
2024-02-06 23:19:27 +01:00
github-actions[bot] 7389c35176
Update osx-x64 SDL binaries (#156)
Co-authored-by: marysaka <marysaka@users.noreply.github.com>
2024-02-06 23:19:20 +01:00
github-actions[bot] 14e19b5164
Update win-x64 SDL binaries (#155)
Co-authored-by: marysaka <marysaka@users.noreply.github.com>
2024-02-06 23:18:47 +01:00
github-actions[bot] 038059ecc9
Update win-arm64 SDL binaries (#154)
Co-authored-by: marysaka <marysaka@users.noreply.github.com>
2024-02-06 23:18:41 +01:00
github-actions[bot] b42777f4d3
Update iOS SDL binaries (#153)
Co-authored-by: marysaka <marysaka@users.noreply.github.com>
2024-02-06 23:18:35 +01:00
github-actions[bot] 82c0c38477
Update linux-x64 SDL binaries (#152)
Co-authored-by: marysaka <marysaka@users.noreply.github.com>
2024-02-06 23:18:29 +01:00
Mary Guillemard c66a752bf5 Add linux-arm64 in csproj
Signed-off-by: Mary Guillemard <mary@mary.zone>
2024-02-06 22:48:29 +01:00
Mary Guillemard 2402c1a0db Enable linux-arm64 in CI
Signed-off-by: Mary Guillemard <mary@mary.zone>
2024-02-06 20:52:14 +01:00
Mary Guillemard 275e67ad11 Move build operation to a bash script
This greatly simplify the action and prepare for building for other archs.

Signed-off-by: Mary Guillemard <mary@mary.zone>
2024-02-06 20:10:42 +01:00
Mary Guillemard 70a111cbb6 Respect workflow argument for iOS
Signed-off-by: Mary Guillemard <mary@mary.zone>
2024-02-06 19:41:53 +01:00
TSRBerry 8f286bb048
Update version to 2.28.3 2023-10-20 16:16:33 +02:00
TSR Berry e96d39d94b
Merge remote-tracking branches 'origin/update-ios-binaries', 'origin/update-linux-x64-binaries', 'origin/update-win-x64-binaries', 'origin/update-win-arm64-binaries', 'origin/update-osx-arm64-binaries' and 'origin/update-osx-x64-binaries' 2023-09-23 20:01:28 +02:00
TSR Berry a389f319ce
Add note about commit sha to workflow input 2023-09-23 19:59:24 +02:00
TSRBerry ce6acac60e Update osx-x64 SDL binaries 2023-09-23 17:57:58 +00:00
TSRBerry 3547f466d7 Update osx-arm64 SDL binaries 2023-09-23 17:57:49 +00:00
TSRBerry 4251b252ed Update iOS SDL binaries 2023-09-23 17:57:22 +00:00
TSRBerry 7f231ea460 Update win-arm64 SDL binaries 2023-09-23 17:56:41 +00:00
TSRBerry 802dd6f15a Update win-x64 SDL binaries 2023-09-23 17:56:35 +00:00
TSRBerry 68ab08e264 Update linux-x64 SDL binaries 2023-09-23 17:55:34 +00:00
TSR Berry df777874bc
Update actions 2023-09-23 19:46:13 +02:00
TSR Berry 232018f03e
Add dependabot.yml 2023-09-23 19:45:52 +02:00
github-actions[bot] 95f9c5c73a
Update osx-x64 SDL binaries (#145)
Co-authored-by: marysaka <marysaka@users.noreply.github.com>
2023-07-14 10:19:39 +02:00
github-actions[bot] 077f5e5171
Update win-x64 SDL binaries (#144)
Co-authored-by: marysaka <marysaka@users.noreply.github.com>
2023-07-14 10:19:31 +02:00
github-actions[bot] 6fa4edcdc4
Update osx-arm64 SDL binaries (#143)
Co-authored-by: marysaka <marysaka@users.noreply.github.com>
2023-07-14 10:19:23 +02:00
github-actions[bot] aa545e727a
Update win-arm64 SDL binaries (#142)
Co-authored-by: marysaka <marysaka@users.noreply.github.com>
2023-07-14 10:19:14 +02:00
github-actions[bot] f4681ebf95
Update linux-x64 SDL binaries (#141)
Co-authored-by: marysaka <marysaka@users.noreply.github.com>
2023-07-14 10:18:25 +02:00
github-actions[bot] 161373c455
Update iOS SDL binaries (#140)
Co-authored-by: marysaka <marysaka@users.noreply.github.com>
2023-07-14 10:18:16 +02:00
Mary 4e470dba41 Update metadata to 2.28.1 2023-07-14 09:31:36 +02:00
TSR Berry 9af6bb8fe8
Update metadata to 2.28.0 2023-07-05 15:50:46 +02:00
TSRBerry 172acaa08d
Update win-x64 SDL binaries 2023-07-05 15:50:46 +02:00
TSRBerry 7ca43ee88c
Update win-arm64 SDL binaries 2023-07-05 15:50:46 +02:00
TSRBerry 497d929939
Update osx-x64 SDL binaries 2023-07-05 15:50:46 +02:00
TSRBerry 54cb2e08c7
Update osx-arm64 SDL binaries 2023-07-05 15:50:46 +02:00
TSRBerry ce3bfab43c
Update linux-x64 SDL binaries 2023-07-05 15:50:46 +02:00
TSRBerry 6bd29ff214
Update iOS SDL binaries 2023-07-05 15:50:45 +02:00
Mary b6e8330d71
Introduce needed changes for Ryujinx's fork 2023-07-05 15:50:34 +02:00
Dean Herbert b4c039993e Merge remote-tracking branch 'upstream/update-win-x86-binaries' 2023-05-21 12:50:01 +09:00
Dean Herbert 832a10c772 Merge remote-tracking branch 'upstream/update-win-x64-binaries' 2023-05-21 12:50:00 +09:00
Dean Herbert 740c7a8f87 Merge remote-tracking branch 'upstream/update-win-arm64-binaries' 2023-05-21 12:49:59 +09:00
Dean Herbert 4d2270aa86 Merge remote-tracking branch 'upstream/update-osx-x64-binaries' 2023-05-21 12:49:58 +09:00
Dean Herbert d046b2f2c1 Merge remote-tracking branch 'upstream/update-osx-arm64-binaries' 2023-05-21 12:49:57 +09:00
Dean Herbert d0361d0e73 Merge remote-tracking branch 'upstream/update-linux-x86-binaries' 2023-05-21 12:49:55 +09:00
Dean Herbert 5dc54d80a0 Merge remote-tracking branch 'upstream/update-linux-x64-binaries' 2023-05-21 12:49:54 +09:00
peppy 2428ad15be Update osx-arm64 SDL binaries 2023-05-21 03:44:23 +00:00
peppy 45535693a6 Update linux-x86 SDL binaries 2023-05-21 03:42:36 +00:00
peppy bccb6a3136 Update osx-x64 SDL binaries 2023-05-21 03:42:27 +00:00
peppy fc8ed7005b Update win-x86 SDL binaries 2023-05-21 03:41:50 +00:00
peppy 2ec5b46232 Update win-x64 SDL binaries 2023-05-21 03:41:41 +00:00
peppy eb9f81ac25 Update win-arm64 SDL binaries 2023-05-21 03:41:13 +00:00
peppy 2b1c66c7eb Update iOS SDL binaries 2023-05-21 03:40:33 +00:00
peppy 16ec96817c Update linux-x64 SDL binaries 2023-05-21 03:40:27 +00:00
Dean Herbert 9b92aed4b4 Merge remote-tracking branch 'upstream/update-win-x86-binaries' 2023-03-08 18:44:04 +09:00
Dean Herbert a730d16076 Merge remote-tracking branch 'upstream/update-win-x64-binaries' 2023-03-08 18:44:03 +09:00
Dean Herbert f0bef1b9c3 Merge remote-tracking branch 'upstream/update-win-arm64-binaries' 2023-03-08 18:44:03 +09:00
Dean Herbert 556cd552dd Merge remote-tracking branch 'upstream/update-osx-x64-binaries' 2023-03-08 18:44:00 +09:00
Dean Herbert d2e0088381 Merge remote-tracking branch 'upstream/update-osx-arm64-binaries' 2023-03-08 18:43:59 +09:00
Dean Herbert aa80fe5791 Merge remote-tracking branch 'upstream/update-linux-x86-binaries' 2023-03-08 18:43:56 +09:00
Dean Herbert 4969c7f3fe Merge remote-tracking branch 'upstream/update-linux-x64-binaries' 2023-03-08 18:43:55 +09:00
peppy 658f11e526 Update win-x86 SDL binaries 2023-03-08 09:24:32 +00:00
peppy ecbe28799d Update osx-x64 SDL binaries 2023-03-08 09:23:22 +00:00
peppy da916a88d5 Update osx-arm64 SDL binaries 2023-03-08 09:23:15 +00:00
peppy 09f36bcf76 Update win-x64 SDL binaries 2023-03-08 09:23:09 +00:00
peppy 07df446ec8 Update win-arm64 SDL binaries 2023-03-08 09:22:55 +00:00
peppy 3d22cd7cb9 Update linux-x86 SDL binaries 2023-03-08 09:22:54 +00:00
peppy 00c73365df Update linux-x64 SDL binaries 2023-03-08 09:21:38 +00:00
peppy a30ddefbaf Update iOS SDL binaries 2023-03-08 09:21:10 +00:00
Dean Herbert 32913b2335
Merge pull request #152 from frenzibyte/ios-build
Add iOS platform support
2023-03-08 18:18:18 +09:00
Dean Herbert 903eebdec4
Remove one unnecessary mkdir invocation 2023-03-08 18:13:40 +09:00
Salman Ahmed 2519332ce6 Bump AppVeyor image 2023-03-08 11:59:01 +03:00
Salman Ahmed e07402105e Bump projects to .NET 6 and add DllImport resolver for iOS 2023-03-08 11:51:55 +03:00
Salman Ahmed 98a238fe07 Include native iOS libraries in package 2023-03-08 11:51:03 +03:00
Salman Ahmed f6cf0b57d1 Add iOS build action 2023-03-08 10:58:00 +03:00
Dean Herbert 7e10ed6133 Merge remote-tracking branch 'upstream/update-win-x86-binaries' 2022-12-12 02:36:36 +09:00
Dean Herbert 3ec97c0015 Merge remote-tracking branch 'upstream/update-win-x64-binaries' 2022-12-12 02:36:35 +09:00
Dean Herbert d00aabdc2f Merge remote-tracking branch 'upstream/update-win-arm64-binaries' 2022-12-12 02:36:34 +09:00
Dean Herbert 429dca2440 Merge remote-tracking branch 'upstream/update-osx-x64-binaries' 2022-12-12 02:36:34 +09:00
Dean Herbert 0b373076f6 Merge remote-tracking branch 'upstream/update-osx-arm64-binaries' 2022-12-12 02:36:33 +09:00
Dean Herbert 0f4a522842 Merge remote-tracking branch 'upstream/update-linux-x86-binaries' 2022-12-12 02:36:32 +09:00
peppy b11bffacf6 Update osx-x64 SDL binaries 2022-12-11 17:33:40 +00:00
peppy fdae20ed32 Update osx-arm64 SDL binaries 2022-12-11 17:31:15 +00:00
peppy 9dd06c9aa7 Update linux-x64 SDL binaries 2022-12-11 17:31:06 +00:00
peppy 3de7aae105 Update win-x86 SDL binaries 2022-12-11 17:29:51 +00:00
peppy aa6c6691d1 Update linux-x86 SDL binaries 2022-12-11 17:29:48 +00:00
peppy 356c96c4b4 Update win-x64 SDL binaries 2022-12-11 17:29:46 +00:00
peppy d5c82b3874 Update win-arm64 SDL binaries 2022-12-11 17:29:27 +00:00
Dean Herbert 0fc27053cd Switch to checkout@v3 2022-12-12 02:26:22 +09:00
Dean Herbert 7b7046588d Lock to SDL2 branch for now 2022-12-12 02:08:25 +09:00
Dean Herbert 30125e4c6d Merge remote-tracking branch 'upstream/update-win-x86-binaries' 2022-10-24 00:58:33 +09:00
Dean Herbert 38d4e62170 Merge remote-tracking branch 'upstream/update-win-x64-binaries' 2022-10-24 00:58:33 +09:00
Dean Herbert ff81aa5bbf Merge remote-tracking branch 'upstream/update-win-arm64-binaries' 2022-10-24 00:58:32 +09:00
Dean Herbert d256ffdeea Merge remote-tracking branch 'upstream/update-osx-x64-binaries' 2022-10-24 00:58:31 +09:00
Dean Herbert 5547e37319 Merge remote-tracking branch 'upstream/update-osx-arm64-binaries' 2022-10-24 00:58:31 +09:00
Dean Herbert 838530d427 Merge remote-tracking branch 'upstream/update-linux-x86-binaries' 2022-10-24 00:58:30 +09:00
peppy ad5cacb46e Update osx-x64 SDL binaries 2022-10-23 15:41:31 +00:00
peppy a0aab9f1c7 Update osx-arm64 SDL binaries 2022-10-23 15:40:15 +00:00
peppy 4071670de8 Update linux-x86 SDL binaries 2022-10-23 15:40:11 +00:00
peppy fb9bc3460a Update win-x64 SDL binaries 2022-10-23 15:39:43 +00:00
peppy 741b0ed124 Update win-x86 SDL binaries 2022-10-23 15:39:05 +00:00
peppy 658b2d0dda Update win-arm64 SDL binaries 2022-10-23 15:38:54 +00:00
peppy b0dff7be83 Update linux-x64 SDL binaries 2022-10-23 15:38:30 +00:00
Dean Herbert b2530ebcfe Merge remote-tracking branch 'upstream/update-win-x86-binaries' 2022-08-15 23:33:09 +09:00
Dean Herbert cfaabd8550 Merge remote-tracking branch 'upstream/update-win-x64-binaries' 2022-08-15 23:33:08 +09:00
Dean Herbert b10629a93b Merge remote-tracking branch 'upstream/update-win-arm64-binaries' 2022-08-15 23:33:06 +09:00
Dean Herbert 66fafb3d76 Merge remote-tracking branch 'upstream/update-osx-x64-binaries' 2022-08-15 23:33:05 +09:00
Dean Herbert bd3a9589c8 Merge remote-tracking branch 'upstream/update-osx-arm64-binaries' 2022-08-15 23:33:04 +09:00
Dean Herbert c525718620 Merge remote-tracking branch 'upstream/update-linux-x86-binaries' 2022-08-15 23:33:02 +09:00
peppy 68b683d275 Update osx-arm64 SDL binaries 2022-08-15 14:15:35 +00:00
peppy 686c286baa Update osx-x64 SDL binaries 2022-08-15 14:15:21 +00:00
peppy 63bf18bb0a Update win-x86 SDL binaries 2022-08-15 14:14:56 +00:00
peppy b3f4650a53 Update win-x64 SDL binaries 2022-08-15 14:14:35 +00:00
peppy 345238b69a Update linux-x86 SDL binaries 2022-08-15 14:14:28 +00:00
peppy b408ea8ed5 Update win-arm64 SDL binaries 2022-08-15 14:13:32 +00:00
peppy 685f7ae03a Update linux-x64 SDL binaries 2022-08-15 14:12:54 +00:00
Dean Herbert a0a77142af Update create-pull-request version to avoid python errors 2022-08-15 23:09:32 +09:00
Dean Herbert bd78b7596e Merge remote-tracking branch 'upstream/update-win-x86-binaries' 2022-08-08 15:01:25 +09:00
Dean Herbert dcfa9193db Merge remote-tracking branch 'upstream/update-win-x64-binaries' 2022-08-08 15:01:24 +09:00
Dean Herbert ff8df8363a Merge remote-tracking branch 'upstream/update-win-arm64-binaries' 2022-08-08 15:01:22 +09:00
Dean Herbert f1157c7b62 Merge remote-tracking branch 'upstream/update-osx-x64-binaries' 2022-08-08 15:01:20 +09:00
Dean Herbert 819ca80e95 Merge remote-tracking branch 'upstream/update-osx-arm64-binaries' 2022-08-08 15:01:19 +09:00
Dean Herbert a2a122d8cf Merge remote-tracking branch 'upstream/update-linux-x86-binaries' 2022-08-08 15:01:15 +09:00
github-actions[bot] f4c321267e Update osx-arm64 SDL binaries 2022-08-08 05:47:21 +00:00
github-actions[bot] 017f034e30 Update osx-x64 SDL binaries 2022-08-08 05:45:33 +00:00
github-actions[bot] f3af14599f Update win-arm64 SDL binaries 2022-08-08 05:43:27 +00:00
github-actions[bot] 978e54378a Update win-x64 SDL binaries 2022-08-08 05:43:15 +00:00
github-actions[bot] 0f36127209 Update win-x86 SDL binaries 2022-08-08 05:42:07 +00:00
github-actions[bot] e0cd3e38b1 Update linux-x86 SDL binaries 2022-08-08 05:41:51 +00:00
github-actions[bot] 78ec07396f Update linux-x64 SDL binaries 2022-08-08 05:40:59 +00:00
Dan Balasescu 4da4dc03d4
Merge pull request #118 from elvodqa/master
Add SDL2_image
2022-05-27 14:32:51 +09:00
Emir Cengiz 56be43cd7b Add SDL2_image.cs 2022-05-27 08:18:40 +03:00
Dean Herbert fd5e568e35 Merge remote-tracking branch 'upstream/update-win-x86-binaries' 2022-05-23 15:16:59 +09:00
Dean Herbert 1f6614f127 Merge remote-tracking branch 'upstream/update-win-x64-binaries' 2022-05-23 15:16:58 +09:00
Dean Herbert 46d736ff5a Merge remote-tracking branch 'upstream/update-win-arm64-binaries' 2022-05-23 15:16:57 +09:00
Dean Herbert b45fdd562a Merge remote-tracking branch 'upstream/update-osx-x64-binaries' 2022-05-23 15:16:56 +09:00
Dean Herbert 9110635e65 Merge remote-tracking branch 'upstream/update-osx-arm64-binaries' 2022-05-23 15:16:54 +09:00
Dean Herbert fca9b7bf84 Merge remote-tracking branch 'upstream/update-linux-x86-binaries' 2022-05-23 15:16:51 +09:00
github-actions[bot] b721400a5a Update osx-x64 SDL binaries 2022-05-23 05:42:10 +00:00
github-actions[bot] 7af8222ce3 Update win-arm64 SDL binaries 2022-05-23 05:41:56 +00:00
github-actions[bot] aacbe5085a Update win-x86 SDL binaries 2022-05-23 05:41:21 +00:00
github-actions[bot] 61272d3cbc Update osx-arm64 SDL binaries 2022-05-23 05:40:57 +00:00
github-actions[bot] 2070a7f25c Update linux-x86 SDL binaries 2022-05-23 05:40:44 +00:00
github-actions[bot] 39e7892cba Update win-x64 SDL binaries 2022-05-23 05:40:33 +00:00
github-actions[bot] ff158cffd3 Update linux-x64 SDL binaries 2022-05-23 05:39:23 +00:00
Dean Herbert 0b5cb56c74
Merge pull request #116 from ekrctb/fix-i386
Workaround GitHub Action ubuntu-20.04 image issue
2022-05-23 14:36:45 +09:00
ekrctb a2a5bb01c1 Workaround GitHub's ubuntu-20.04 image issue
This should fix linux-x86 failure
2022-05-23 14:21:45 +09:00
Dean Herbert 562fc2fcfe
Merge pull request #115 from ekrctb/fix-i386
Fix linux-x86 build failure and improve apt-get command line
2022-05-23 13:13:48 +09:00
ekrctb 9f7112dab7 Improve apt-get command line
- Use native Ninja.
- `libwayland-client++0` and `libwayland-cursor++0` are redundant
  because these are dependencies of `libwayland-dev`
- Added `-y` flag and `cmake` for local testing.
2022-05-23 12:48:22 +09:00
ekrctb 95c34e8606 Remove PPA that is no longer needed
this is no longer needed because we updated OS to 20.04
and it is breaking i386 build
2022-05-23 12:40:20 +09:00
Dean Herbert 74b903b48f
Merge pull request #108 from ekrctb/bump-linux-builder
Bump Linux builder OS to ubuntu-20.04
2022-05-22 19:03:19 +09:00
ekrctb 79efec7b3a Bump Linux builder OS to ubuntu-20.04
The resulting binary will require glibc version 2.31 or newer.
2022-05-21 18:37:01 +09:00
Dean Herbert d6ddadcd3f Merge remote-tracking branch 'upstream/update-osx-x64-binaries' 2022-05-09 19:29:07 +09:00
github-actions[bot] 5b8f857b62 Update osx-x64 SDL binaries 2022-05-09 10:20:23 +00:00
Dean Herbert 619b60041d Merge remote-tracking branch 'upstream/update-win-x86-binaries' 2022-05-09 19:14:51 +09:00
Dean Herbert 1c79fa9d6b Merge remote-tracking branch 'upstream/update-win-x64-binaries' 2022-05-09 19:14:50 +09:00
Dean Herbert 1815852dcc Merge remote-tracking branch 'upstream/update-win-arm64-binaries' 2022-05-09 19:14:49 +09:00
Dean Herbert 4eaea60401 Merge remote-tracking branch 'upstream/update-osx-arm64-binaries' 2022-05-09 19:14:20 +09:00
Dean Herbert 46f2eabdc7 Merge remote-tracking branch 'upstream/update-linux-x86-binaries' 2022-05-09 19:14:18 +09:00
github-actions[bot] f06b293caa Update osx-arm64 SDL binaries 2022-05-09 10:12:34 +00:00
github-actions[bot] c7e834b048 Update win-x64 SDL binaries 2022-05-09 10:10:05 +00:00
github-actions[bot] fdbdfbc6b4 Update win-x86 SDL binaries 2022-05-09 10:09:56 +00:00
github-actions[bot] 2e544995ce Update linux-x86 SDL binaries 2022-05-09 10:09:47 +00:00
github-actions[bot] 7c09b28d8a Update win-arm64 SDL binaries 2022-05-09 10:09:04 +00:00
github-actions[bot] c33223356b Update linux-x64 SDL binaries 2022-05-09 10:07:01 +00:00
Dean Herbert f0df2348d3
Merge pull request #100 from peppy/2.0.22
Pull in 2.0.22 changes from upstream
2022-05-09 19:03:39 +09:00
Dean Herbert 36ca8b2802 Merge branch 'flibitijibibo/master' 2022-05-09 19:01:28 +09:00
Ethan Lee 34338dfab2 2.0.22 2022-05-01 11:55:31 -04:00
Dean Herbert d1e53cea05 Merge remote-tracking branch 'upstream/update-win-x86-binaries' 2022-01-29 15:01:22 +09:00
Dean Herbert 1821b2bb17 Merge remote-tracking branch 'upstream/update-win-x64-binaries' 2022-01-29 15:01:21 +09:00
Dean Herbert b7fd7d726c Merge remote-tracking branch 'upstream/update-win-arm64-binaries' 2022-01-29 15:01:21 +09:00
Dean Herbert 19aa8b1798 Merge remote-tracking branch 'upstream/update-osx-x64-binaries' 2022-01-29 15:01:20 +09:00
Dean Herbert f32e4b5478 Merge remote-tracking branch 'upstream/update-osx-arm64-binaries' 2022-01-29 15:01:19 +09:00
Dean Herbert 366aa00589 Merge remote-tracking branch 'upstream/update-linux-x86-binaries' 2022-01-29 15:01:17 +09:00
github-actions[bot] ae180cfc1f Update osx-x64 SDL binaries 2022-01-29 05:49:57 +00:00
github-actions[bot] 187f94d325 Update osx-arm64 SDL binaries 2022-01-29 05:49:17 +00:00
github-actions[bot] 81c382eab4 Update win-arm64 SDL binaries 2022-01-29 05:47:34 +00:00
github-actions[bot] 11d2922072 Update win-x64 SDL binaries 2022-01-29 05:47:28 +00:00
github-actions[bot] 702b7c877a Update win-x86 SDL binaries 2022-01-29 05:47:01 +00:00
github-actions[bot] 735989b51e Update linux-x64 SDL binaries 2022-01-29 05:46:37 +00:00
github-actions[bot] 8cefdf4486 Update linux-x86 SDL binaries 2022-01-29 05:45:54 +00:00
Ethan Lee b35aaa494e 2.0.20 changes 2022-01-10 16:07:17 -05:00
Ethan Lee 83205d8921 SDL2# now supports SDL2_gfx! 2021-12-17 13:00:55 -05:00
Ethan Lee 12137a127b SDL2_gfx dllmap 2021-12-17 13:00:14 -05:00
Ethan Lee f62950eae7 SDL2_gfx tabbing/license cleanup 2021-12-17 13:00:01 -05:00
Refrag 0a8a135a34
SDL2_gfx library bindings (#230) 2021-12-17 12:57:53 -05:00
Caleb Cornett 298a725adb
Update for 2.0.18 (#229) 2021-11-30 12:27:41 -05:00
Dean Herbert 9a9d4fbfb9 Merge remote-tracking branch 'upstream/update-osx-x64-binaries' 2021-11-23 18:05:50 +09:00
Dean Herbert f84a835639 Merge remote-tracking branch 'upstream/update-win-x86-binaries' 2021-11-23 18:05:48 +09:00
Dean Herbert 52f2a61602 Merge remote-tracking branch 'upstream/update-win-x64-binaries' 2021-11-23 18:05:45 +09:00
Dean Herbert 3b42c239f0 Merge remote-tracking branch 'upstream/update-win-arm64-binaries' 2021-11-23 18:05:43 +09:00
Dean Herbert a0a6f8f64d Merge remote-tracking branch 'upstream/update-osx-arm64-binaries' 2021-11-23 18:05:41 +09:00
Dean Herbert d4c8b25a79 Merge remote-tracking branch 'upstream/update-linux-x86-binaries' 2021-11-23 18:05:40 +09:00
github-actions[bot] 31db8dd836 Update osx-x64 SDL binaries 2021-11-23 08:40:03 +00:00
github-actions[bot] 0e75d73195 Update osx-arm64 SDL binaries 2021-11-23 08:39:51 +00:00
github-actions[bot] 8f179f0549 Update win-x86 SDL binaries 2021-11-23 08:39:37 +00:00
github-actions[bot] ff380bf048 Update win-arm64 SDL binaries 2021-11-23 08:39:11 +00:00
github-actions[bot] 48224c9bd6 Update win-x64 SDL binaries 2021-11-23 08:38:45 +00:00
github-actions[bot] d4bc1065c0 Update linux-x86 SDL binaries 2021-11-23 08:38:31 +00:00
github-actions[bot] c168f4271a Update linux-x64 SDL binaries 2021-11-23 08:37:43 +00:00
Dean Herbert 0c6e7ac1a2 Merge branch '2.0.18' 2021-11-23 17:32:21 +09:00
Dean Herbert 054e86eabe Stop using fork 2021-11-23 17:29:50 +09:00
Dean Herbert 6dd9f14040
Merge pull request #85 from Susko3/add-hint-ime-show-ui 2021-11-21 10:04:14 +09:00
Susko3 9a854009f0 Add SDL_HINT_IME_SHOW_UI
SDL 2.0.18 doesn't exist yet, but I'm guessing https://github.com/libsdl-org/SDL/pull/4707
will make it in.

That PR is already included in our current libs.
2021-11-20 20:53:30 +01:00
Caleb Cornett 80841ecef0 Update for 2.0.18 2021-11-19 14:01:58 -05:00
Jeremy Sayers 4e9088b49d Add Mix_GetError, Mix_SetError, Mix_ClearError
Adding `Mix_GetError`, `Mix_SetError`, `Mix_ClearError` as per the SDL_mixer header file:

/* We'll use SDL for reporting errors */
#define Mix_SetError    SDL_SetError
#define Mix_GetError    SDL_GetError
#define Mix_ClearError  SDL_ClearError
2021-11-14 12:51:37 -05:00
Jeremy Sayers db935863bb Add TTF_GetError and TTF_SetError
Adding some missing functions to SDL2_ttf that are just wrappers of the `SDL_GetError` and `SDL_SetError` as per the SDL_ttf header:
```
/* We'll use SDL for reporting errors */
#define TTF_SetError    SDL_SetError
#define TTF_GetError    SDL_GetError
```
2021-11-14 12:45:23 -05:00
s341507 ec5e8d8357 Fixed field type of ctouchpad and csensor in SDL_Event. 2021-11-03 10:09:07 -04:00
Caleb Cornett 5df88baf4b Add missing EntryPoint for SDL_AndroidShowToast 2021-11-02 15:20:30 -04:00
Dean Herbert 9ad2ef91d4 Merge remote-tracking branch 'upstream/update-win-x86-binaries' 2021-10-25 19:11:20 +09:00
Dean Herbert 46d450901c Merge remote-tracking branch 'upstream/update-win-x64-binaries' 2021-10-25 19:11:19 +09:00
Dean Herbert a903801fcb Merge remote-tracking branch 'upstream/update-win-arm64-binaries' 2021-10-25 19:11:19 +09:00
Dean Herbert 79c04ec4e4 Merge remote-tracking branch 'upstream/update-osx-x64-binaries' 2021-10-25 19:11:17 +09:00
Dean Herbert 365ac7343c Merge remote-tracking branch 'upstream/update-osx-arm64-binaries' 2021-10-25 19:11:15 +09:00
Dean Herbert 589530739f Merge remote-tracking branch 'upstream/update-linux-x86-binaries' 2021-10-25 19:11:13 +09:00
github-actions[bot] 3dd6caee61 Update osx-x64 SDL binaries 2021-10-25 09:02:48 +00:00
github-actions[bot] 7b9cc0930c Update osx-arm64 SDL binaries 2021-10-25 09:02:21 +00:00
github-actions[bot] 9e75a76b27 Update win-x64 SDL binaries 2021-10-25 09:01:53 +00:00
github-actions[bot] 1ccc304a3b Update win-x86 SDL binaries 2021-10-25 09:01:01 +00:00
github-actions[bot] 41f1a7b98c Update win-arm64 SDL binaries 2021-10-25 09:00:33 +00:00
github-actions[bot] 7411451ccd Update linux-x86 SDL binaries 2021-10-25 09:00:16 +00:00
github-actions[bot] 6cbf30b667 Update linux-x64 SDL binaries 2021-10-25 08:59:36 +00:00
Dean Herbert 13efd80035 Merge remote-tracking branch 'upstream/update-linux-x64-binaries' 2021-08-20 13:32:14 +09:00
Dean Herbert 661432e075 Merge remote-tracking branch 'upstream/update-linux-x86-binaries' 2021-08-20 13:32:13 +09:00
Dean Herbert 07bf0132e2 Merge remote-tracking branch 'upstream/update-osx-arm64-binaries' 2021-08-20 13:32:12 +09:00
Dean Herbert 1740846bfb Merge remote-tracking branch 'upstream/update-osx-x64-binaries' 2021-08-20 13:32:12 +09:00
Dean Herbert c7b2eed527 Merge remote-tracking branch 'upstream/update-win-arm64-binaries' 2021-08-20 13:32:11 +09:00
Dean Herbert 1f5701255d Merge remote-tracking branch 'upstream/update-win-x64-binaries' 2021-08-20 13:32:10 +09:00
Dean Herbert 47d127ff42 Merge remote-tracking branch 'upstream/update-win-x86-binaries' 2021-08-20 13:32:09 +09:00
github-actions[bot] 57efe7508d Update win-x86 SDL binaries 2021-08-20 13:28:43 +09:00
github-actions[bot] 180c6624da Update win-x64 SDL binaries 2021-08-20 13:28:43 +09:00
github-actions[bot] 616ec3e4af Update win-arm64 SDL binaries 2021-08-20 13:28:42 +09:00
github-actions[bot] d122cdc0cc Update osx-x64 SDL binaries 2021-08-20 13:28:42 +09:00
github-actions[bot] 7fef4e4bcf Update osx-arm64 SDL binaries 2021-08-20 13:28:42 +09:00
github-actions[bot] 54fea85d7f Update linux-x86 SDL binaries 2021-08-20 13:28:42 +09:00
github-actions[bot] 7e253ea7fd Update linux-x64 SDL binaries 2021-08-20 13:28:42 +09:00
github-actions[bot] 1b8cb2a3ef Update osx-x64 SDL binaries 2021-08-20 04:24:33 +00:00
Dean Herbert be91db5b85
Don't automatically build native dependencies on push
We don't really need this. We always manually do these updates anyway.
2021-08-20 13:24:04 +09:00
github-actions[bot] e063120875 Update osx-arm64 SDL binaries 2021-08-20 04:20:30 +00:00
github-actions[bot] a5dd0e3002 Update win-x64 SDL binaries 2021-08-20 04:12:32 +00:00
github-actions[bot] 55c8fc9736 Update win-arm64 SDL binaries 2021-08-20 04:12:09 +00:00
github-actions[bot] 1d947d73ad Update win-x86 SDL binaries 2021-08-20 04:11:50 +00:00
github-actions[bot] c51685eab3 Update linux-x64 SDL binaries 2021-08-20 04:11:14 +00:00
github-actions[bot] 6ce8eaf83a Update linux-x86 SDL binaries 2021-08-20 04:10:50 +00:00
Esme 904eed3cb0 Fix typo in version comment 2021-08-16 14:35:27 -04:00
Mary 931d5fc06e Add multiple missing pointer overloads
THis adds some missing overloads that Ryujinx uses.

Changelog:
- Add a new overload of SDL_MixAudioFormat to allow passing raw pointers
  as dest and src (useful for usage with SDL_AudioSpec's callback).
- Add a new overload of SDL_OpenAudioDevice to allow passing null for
  the device parameter.
- Add a new overload of SDL_Vulkan_GetInstanceExtensions to allow
  passing null for the pName parameter.
2021-08-14 06:24:16 -04:00
Dean Herbert 8ac357412e
Merge pull request #65 from ppy/update-win-x64-binaries
Update win-x64 SDL binaries
2021-08-11 13:21:44 +09:00
Dean Herbert e7e6bdefb0
Merge pull request #67 from ppy/update-win-x86-binaries
Update win-x86 SDL binaries
2021-08-11 13:21:36 +09:00
Dean Herbert 36ceacad9b
Merge pull request #66 from ppy/update-win-arm64-binaries
Update win-arm64 SDL binaries
2021-08-11 13:21:20 +09:00
github-actions[bot] c1556e8f95 Update win-x64 SDL binaries 2021-08-11 03:03:10 +00:00
github-actions[bot] 52db66311c Update win-x86 SDL binaries 2021-08-11 03:03:05 +00:00
github-actions[bot] 606c573d3e Update win-arm64 SDL binaries 2021-08-11 03:03:03 +00:00
Dean Herbert c94f27fa40 Merge branch 'flibitijibibo/master' 2021-08-11 11:59:58 +09:00
Caleb Cornett 09716fcbc2 Update to 2.0.16 2021-08-10 15:49:29 -04:00
Dean Herbert 7a875af110
Merge pull request #53 from ppy/update-win-arm64-binaries
Update win-arm64 SDL binaries
2021-08-06 23:05:44 +09:00
Dean Herbert 253d6b4da9
Merge pull request #54 from ppy/update-win-x86-binaries
Update win-x86 SDL binaries
2021-08-06 23:05:38 +09:00
Dean Herbert 88abfa1730
Merge pull request #55 from ppy/update-win-x64-binaries
Update win-x64 SDL binaries
2021-08-06 23:05:33 +09:00
Dean Herbert 4c2bf2ab88
Merge pull request #62 from ppy/update-osx-arm64-binaries
Update osx-arm64 SDL binaries
2021-08-06 23:05:27 +09:00
Dean Herbert 82aef37aca
Merge pull request #63 from ppy/update-osx-x64-binaries
Update osx-x64 SDL binaries
2021-08-06 23:05:21 +09:00
Dean Herbert 52e4a98e0a
Merge pull request #61 from ppy/update-linux-x86-binaries
Update linux-x86 SDL binaries
2021-08-06 23:05:03 +09:00
Dean Herbert 7a7197c277
Merge pull request #60 from ppy/update-linux-x64-binaries
Update linux-x64 SDL binaries
2021-08-06 23:04:53 +09:00
github-actions[bot] ef5dc11cd3 Update osx-x64 SDL binaries 2021-08-06 14:02:43 +00:00
github-actions[bot] e368843d7a Update osx-arm64 SDL binaries 2021-08-06 14:02:28 +00:00
github-actions[bot] 74a1fff30b Update win-x86 SDL binaries 2021-08-06 14:00:55 +00:00
github-actions[bot] bcec137696 Update win-x64 SDL binaries 2021-08-06 14:00:18 +00:00
github-actions[bot] 33e12f2306 Update win-arm64 SDL binaries 2021-08-06 13:59:54 +00:00
github-actions[bot] 3fcefdd96d Update linux-x86 SDL binaries 2021-08-06 13:59:36 +00:00
github-actions[bot] 104a0e76cc Update linux-x64 SDL binaries 2021-08-06 13:58:54 +00:00
wanderer06 d5e1e56983 Add NULL overload to SDL_SetWindowDisplayMode 2021-08-04 16:58:59 -04:00
Dean Herbert 184bcfd476
Merge pull request #49 from ppy/update-linux-x64-binaries
Update linux-x64 SDL binaries
2021-07-25 15:31:13 +09:00
Dean Herbert ae543f186c
Merge pull request #50 from ppy/update-linux-x86-binaries
Update linux-x86 SDL binaries
2021-07-25 15:30:58 +09:00
github-actions[bot] 1f2d1af595 Update linux-x86 SDL binaries 2021-07-25 06:29:36 +00:00
github-actions[bot] ec825444fb Update linux-x64 SDL binaries 2021-07-25 06:28:52 +00:00
Dean Herbert d786027acc
Merge pull request #59 from frenzibyte/fix-linux-failures
Fix linux platform workflow failures
2021-07-25 15:26:42 +09:00
Salman Ahmed 7e899b49c0 Fix linux platform workflow failures 2021-07-25 09:11:53 +03:00
Dean Herbert 2c82d193b9
Merge pull request #39 from ppy/update-win-arm64-binaries
Update win-arm64 SDL binaries
2021-07-25 13:48:22 +09:00
Dean Herbert 300874e40a
Merge pull request #51 from ppy/update-osx-x64-binaries
Update osx-x64 SDL binaries
2021-07-25 13:48:14 +09:00
Dean Herbert 4b751678a2
Merge pull request #52 from ppy/update-osx-arm64-binaries
Update osx-arm64 SDL binaries
2021-07-25 13:48:07 +09:00
Dean Herbert d0d4705c55
Merge pull request #41 from ppy/update-win-x86-binaries
Update win-x86 SDL binaries
2021-07-25 13:47:43 +09:00
Dean Herbert d9511db82c
Merge pull request #40 from ppy/update-win-x64-binaries
Update win-x64 SDL binaries
2021-07-25 13:47:33 +09:00
github-actions[bot] 16fdc264b6 Update osx-arm64 SDL binaries 2021-07-25 04:36:46 +00:00
github-actions[bot] 1415d15998 Update osx-x64 SDL binaries 2021-07-25 04:33:23 +00:00
github-actions[bot] cd42526f1c Update win-arm64 SDL binaries 2021-07-25 04:32:55 +00:00
github-actions[bot] 251ec9ae31 Update win-x86 SDL binaries 2021-07-25 04:32:51 +00:00
github-actions[bot] b188a3b90c Update win-x64 SDL binaries 2021-07-25 04:32:48 +00:00
Dean Herbert 9cb3215569
Merge pull request #48 from boswelja/missing-includes
Add missing includes for available binaries
2021-07-22 19:37:52 +09:00
Jack Boswell (boswelja) a535172268 Add missing win-arm64 include 2021-07-22 20:35:36 +12:00
Jack Boswell (boswelja) afaa34f0f3 Add missing include for osx-arm64 2021-07-22 20:34:55 +12:00
Ethan Lee b2ed029f11 Woops, an internal function was public 2021-07-13 16:46:43 -04:00
Ethan Lee 8c25be5b12 Free GameControllerMapping return values 2021-06-29 15:56:23 -04:00
Dean Herbert 42709cf78f Merge branch 'flibitijibibo/master' 2021-06-06 23:24:51 +09:00
Ethan Lee 00c94a24eb Allow Utf8EncodeHeap to return NULL, clean up Utf8Size 2021-05-15 09:58:00 -04:00
Ethan Lee e316ae5cfd Give the heap-allocated Utf8Encode a unique function name 2021-05-15 09:47:28 -04:00
Ethan Lee a234470e39
Make all UTF8 conversions nullable.
Trying to avoid null strings was far too invasive and kept creating bugs in the wrapper, and the wrapper should not have enough code to create bugs in the first place.
2021-05-15 09:10:02 -04:00
Dean Herbert abd696f7c0 Merge remote-tracking branch 'upstream/update-linux-x86-binaries' 2021-05-01 20:10:15 +09:00
github-actions[bot] 8b76a259af Update linux-x86 SDL binaries 2021-05-01 10:31:31 +00:00
github-actions[bot] 0ea9805e1d Update linux-x64 SDL binaries 2021-05-01 10:31:12 +00:00
Dean Herbert dc716ca7c5
Merge pull request #43 from Ryujinx/fix/ubuntu-18.04
ci: Build on ubuntu 18.04 for Linux
2021-05-01 19:28:38 +09:00
Mary db92e59f27 ci: Build on ubuntu 18.04 for Linux
This is to ensure we have an old enough glibc to be compatible wih
ancient version of it.
2021-05-01 12:04:16 +02:00
Ethan Lee fadd0135c3
Removed obsolete Roadmap section from README 2021-04-19 11:57:58 -04:00
Ethan Lee e8bf894c31
Try to fix use of C long in TTF_FontFaces 2021-04-19 11:54:43 -04:00
Dean Herbert 94f6c5e79a Merge remote-tracking branch 'upstream/update-win-x86-binaries' 2021-04-10 00:00:31 +09:00
Dean Herbert b97b3cd339 Merge remote-tracking branch 'upstream/update-win-x64-binaries' 2021-04-10 00:00:29 +09:00
Dean Herbert 460f879545 Merge remote-tracking branch 'upstream/update-win-arm64-binaries' 2021-04-10 00:00:28 +09:00
Dean Herbert 5944136044 Merge remote-tracking branch 'upstream/update-osx-x64-binaries' 2021-04-10 00:00:26 +09:00
Dean Herbert c54101eaf5 Merge remote-tracking branch 'upstream/update-osx-arm64-binaries' 2021-04-10 00:00:25 +09:00
Dean Herbert b40112a74b Merge remote-tracking branch 'upstream/update-linux-x86-binaries' 2021-04-10 00:00:22 +09:00
github-actions[bot] 722f71f3a5 Update osx-arm64 SDL binaries 2021-04-09 13:25:21 +00:00
github-actions[bot] 2ee992ef3b Update osx-x64 SDL binaries 2021-04-09 13:25:11 +00:00
github-actions[bot] 4785fd817f Update win-arm64 SDL binaries 2021-04-09 13:22:43 +00:00
github-actions[bot] a04537c994 Update win-x64 SDL binaries 2021-04-09 13:22:42 +00:00
github-actions[bot] 8462f99195 Update win-x86 SDL binaries 2021-04-09 13:22:41 +00:00
github-actions[bot] 7b7585b045 Update linux-x86 SDL binaries 2021-04-09 13:21:30 +00:00
github-actions[bot] 65b8105f09 Update linux-x64 SDL binaries 2021-04-09 13:21:06 +00:00
Dean Herbert 83717c51ef
Merge pull request #23 from ppy/update-linux-x64-binaries
Update linux-x64 SDL binaries
2021-04-07 11:37:00 +09:00
Dean Herbert b8b194a7ec
Merge pull request #24 from ppy/update-linux-x86-binaries
Update linux-x86 SDL binaries
2021-04-07 11:36:47 +09:00
Dean Herbert c9b096c847
Merge pull request #25 from ppy/update-win-x86-binaries
Update win-x86 SDL binaries
2021-04-07 11:36:39 +09:00
Dean Herbert 4c196724b0
Merge pull request #26 from ppy/update-win-arm64-binaries
Update win-arm64 SDL binaries
2021-04-07 11:36:33 +09:00
Dean Herbert ecc9a9a154
Merge pull request #27 from ppy/update-win-x64-binaries
Update win-x64 SDL binaries
2021-04-07 11:36:28 +09:00
Dean Herbert d5484a2fec
Merge pull request #28 from ppy/update-osx-arm64-binaries
Update osx-arm64 SDL binaries
2021-04-07 11:36:23 +09:00
Dean Herbert 9be777f917
Merge pull request #29 from ppy/update-osx-x64-binaries
Update osx-x64 SDL binaries
2021-04-07 11:35:14 +09:00
github-actions[bot] c0281870b1 Update osx-x64 SDL binaries 2021-04-07 01:20:24 +00:00
github-actions[bot] a858e3061d Update osx-arm64 SDL binaries 2021-04-07 01:19:18 +00:00
github-actions[bot] 8110b3c582 Update win-arm64 SDL binaries 2021-04-07 01:19:06 +00:00
github-actions[bot] 89753c4684 Update win-x64 SDL binaries 2021-04-07 01:19:05 +00:00
github-actions[bot] 36eccd760b Update win-x86 SDL binaries 2021-04-07 01:19:01 +00:00
github-actions[bot] 0c4c44634f Update linux-x86 SDL binaries 2021-04-07 01:19:00 +00:00
github-actions[bot] b904c1164d Update linux-x64 SDL binaries 2021-04-07 01:17:53 +00:00
Dean Herbert 8825ccdf59
Merge pull request #22 from Ryujinx/feature/ci-revamp 2021-04-07 10:15:29 +09:00
Mary 4ca474a69b Switch target repo to ppy/SDL 2021-04-06 23:52:40 +02:00
Mary 8807bcc1b2 Rework CI
This rework current CI to build on all standard platform and architectures.

The following changes were made:
- Adds support for Windows x86, x64 and ARM64 builds
- Adds support for macOS arm64
- Use cmake instead of autoconf
- All artifacts are now build in Release insead of Debug
- A matrix is now used instead of individual steps to deduplicate steps and to allow adding new target architecture with a single line
- If build of one job fails, it will now let others continue instead of cancelling them
- The action can now be triggered via a manual workflow
2021-04-05 17:34:55 +02:00
Dean Herbert 503baa3663 Use locally build macOS libSDL to fix macOS 10.14 compatibility 2021-04-02 16:18:46 +09:00
Dean Herbert 408fadcded Try forcing xcode-select 2021-04-02 15:37:35 +09:00
Dean Herbert 8a2eb9bfa0 Use DEVELOPER_DIR instead 2021-04-02 15:19:06 +09:00
Dean Herbert e05d0ef426 Attempt to force older version of xcode 2021-04-02 15:11:52 +09:00
Dean Herbert 53596261ca
Merge pull request #19 from ppy/update-macos-binaries
Update macOS SDL binaries
2021-04-02 14:35:21 +09:00
github-actions[bot] e230266ff3 Update macOS SDL binaries 2021-04-02 05:34:08 +00:00
Dean Herbert 1b81e33fee Update windows binaries
Still building these manually as we don't have a github script for it
yet.
2021-04-02 14:28:18 +09:00
Dean Herbert 947e2503da Move envvar to correct task 2021-04-02 14:22:45 +09:00
Dean Herbert b6fdbf043e
Merge pull request #17 from ppy/update-macos-binaries
Update macOS SDL binaries
2021-04-02 14:14:46 +09:00
github-actions[bot] c37b077242 Update macOS SDL binaries 2021-04-02 05:03:04 +00:00
Dean Herbert 9bf64d5cd1 Attempt to target earlier macOS SDK version 2021-04-02 13:57:14 +09:00
Dean Herbert 3216da88bf
Merge pull request #18 from ppy/update-linux-binaries
Update Linux SDL binaries
2021-04-02 13:57:08 +09:00
github-actions[bot] 7bc858acd8 Update Linux SDL binaries 2021-04-02 04:54:37 +00:00
Dean Herbert cc7d210bf4 Move fork to org 2021-04-02 13:43:25 +09:00
Dean Herbert 3442d7e8b4 Target fork for the time being 2021-04-02 13:39:40 +09:00
Dean Herbert a043e0bb33 Add alpha suffix to release as prerelease package 2021-04-02 13:35:55 +09:00
Dean Herbert 186a34554d Merge branch 'flibitijibibo/master' 2021-03-30 11:21:03 +09:00
Dean Herbert 67dc4d0842
Merge pull request #9 from ppy/update-linux-binaries
Update Linux SDL binaries
2021-03-30 10:33:35 +09:00
Dean Herbert d00bb32648
Merge pull request #8 from ppy/update-macos-binaries
Update macOS SDL binaries
2021-03-30 10:33:15 +09:00
github-actions[bot] 18cbf1485e Update Linux SDL binaries 2021-03-30 00:37:09 +00:00
github-actions[bot] 742ad3c971 Update macOS SDL binaries 2021-03-30 00:33:12 +00:00
Dean Herbert 82e95483bd
Merge pull request #13 from Ryujinx/feature/2.0.14 2021-03-30 09:26:36 +09:00
Mary 800ae50c84 Add some missing hints from 2.0.14 and minor correctness updates
This is based on my update to 2.0.14 I did based on ppy's fork.
Even if what I did in the end was duplicate compared to upstream, I found some differences and missing bits.

This commit is here to address those missing bits.
2021-03-29 16:06:26 -04:00
Mary e2fb4179bd Fix Github Action build
This fix github actions build issues since SDL migration to github.
2021-03-29 20:30:37 +02:00
Dean Herbert eb4e0cbe50
Merge pull request #14 from peppy/merge-upstream 2021-03-29 16:47:19 +09:00
Dean Herbert dc028d0497 Merge branch 'flibitijibibo/master' into merge-upstream 2021-03-29 16:45:52 +09:00
Dean Herbert 32330ebdbd Update windows binaries 2021-03-29 16:37:01 +09:00
Ethan Lee 53026deb22 Fix some native memory leaks in the newer functions 2021-03-13 16:13:27 -05:00
Ethan Lee 2b8d237fd4 Support SDL2-CS.Settings.props for both project types 2021-03-01 09:20:52 -05:00
deccer f636c6175d
Add support for SDL2-CS.Settings.props, for custom build options. (#214)
Based on FNA.Settings.props.
2021-02-15 09:30:49 -05:00
Ethan Lee 22301b61f4 Fix SDL_LoadFile signature 2021-02-03 11:00:31 -05:00
ameliadiedrich 21ec9cecad Added SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR Hint 2021-01-27 10:34:02 -05:00
Ethan Lee 1e01bc8eeb Happy New Year! 2021-01-01 11:32:54 -05:00
Ethan Lee 332667f37b
Fix return type for GameControllerGetSensorData 2020-12-22 02:01:34 -05:00
Caleb Cornett 4eab64f274
Updates for SDL 2.0.14 (#210) 2020-12-21 23:55:22 -05:00
Dan Balasescu 51e0a82a3c
Merge pull request #12 from peppy/fix-missing-linux-binaries
Add csproj include rules for linux binaries
2020-12-02 15:20:47 +09:00
Dean Herbert c5911dcc22 Add missing include rules for linux bianries to csproj 2020-12-02 14:54:02 +09:00
Dean Herbert 5ace052807 Rename linux libraries to match expected filename 2020-12-02 14:52:45 +09:00
Dan Balasescu 5b7f489e98
Merge pull request #11 from peppy/macos-mojave-build
Switch macOS build to mojave host
2020-11-19 19:28:31 +09:00
Dean Herbert ef21e36cea Switch macOS build to mojave host 2020-11-19 19:04:00 +09:00
Dan Balasescu 600dfe2de5
Merge pull request #10 from peppy/update-windows-native-libraries
Rollback windows builds to latest release (2.0.12)
2020-11-19 18:48:05 +09:00
Dean Herbert 0dfc1a8cbb Rollback windows builds to latest release (2.0.12)
Addresses the issue we found in https://github.com/ppy/osu-framework/issues/4004
2020-11-19 18:41:11 +09:00
Ethan Lee 0287457930 Fix my terrible LoadWAV signature 2020-11-15 10:46:01 -05:00
Dan Balasescu 4c3602ce14
Merge pull request #3 from ppy/update-linux-binaries
Update Linux SDL binaries
2020-11-09 18:55:46 +09:00
Dan Balasescu 98e58cb814
Merge pull request #7 from ppy/update-macos-binaries
Update macOS SDL binaries
2020-11-09 18:55:34 +09:00
Dan Balasescu 1a11a38891
Merge pull request #6 from peppy/update-windows-native-libraries
Update windows native libraries
2020-11-09 18:53:52 +09:00
github-actions[bot] eedabe04d2 Update Linux SDL binaries 2020-11-09 09:16:58 +00:00
github-actions[bot] c219f70e0d Update macOS SDL binaries 2020-11-09 09:14:18 +00:00
Dan Balasescu 5acf9e579e
Merge pull request #5 from peppy/add-macos-native-build-action
Add macOS native binary build workflow
2020-11-09 18:06:07 +09:00
Dean Herbert 243fe0b884 Update windows native libraries to latest snapshot version 2020-11-09 16:02:39 +09:00
Dean Herbert 9289a3fd82 Add macOS native binary build workflow 2020-11-09 15:18:08 +09:00
Jeremy Sayers 5966578e82 Added IMG_GetError and IMG_SetError wrapping calls to SDL_GetError and SDL_SetError to keep SDL2_image.cs consistent with SDL2_image.h 2020-10-29 09:07:30 -04:00
Chad Yates e95ef4e98a Fix buffer overflow. 2020-06-23 05:41:44 -04:00
Caleb Cornett b253a810e0 Add padding to SDL_Event 2020-06-12 23:00:32 -04:00
Caleb Cornett f4d713f651 ExternalStorageState -> ExternalStoragePath 2020-06-12 16:46:39 -04:00
Ethan Lee a31694d145 F# keyword fix 2020-06-08 09:59:03 -04:00
Ethan Lee 3e7eaf9d5b Added checks for null UTF8 inputs 2020-05-28 10:40:21 -04:00
Ethan Lee c782115e7f Minor style fixes, UTF8 update for mixer/ttf 2020-05-21 10:24:46 -04:00
Chad Yates 040d39b4a5
Avoid string and byte[] allocation when converting to UTF8 native string (#192) 2020-05-21 10:00:19 -04:00
Dan Balasescu 4d11cf48a9
Merge pull request #4 from Xyene/linux-sdl-fixups
Small fixups for Linux SDL builder
2020-05-07 11:02:31 +09:00
Tudor Brindus 0c9a67cd45 Check out SDL sources only once
This prevents weird issues where a commit can happen between when the
i386 binaries are built and when amd64 binaries are built, and also
speeds up the workflow a bit.
2020-05-06 16:07:55 -04:00
Tudor Brindus 6dba3318fa Properly title the Linux SDL autogenerated PR 2020-05-06 16:03:36 -04:00
Dean Herbert 12c4d809ef
Merge pull request #2 from Xyene/linux-libsdl-build
Add Docker-based build for building SDL on Linux
2020-05-05 15:01:48 +09:00
Tudor Brindus 155c51adb8 Add GitHub workflow to rebuild SDL binaries for Linux 2020-04-29 21:37:55 -04:00
Tudor Brindus 0addb31520 Add initial build of Linux SDL binaries 2020-04-29 21:37:55 -04:00
Tudor Brindus 32c23f3e35 Add Docker-based build for building SDL on Linux
Example usage, to build i386 libs:

  docker build -t sdl2-i386 -f Dockerfile.i386 .
  mkdir i386
  docker run -v `pwd`/compile:/entry -v `pwd`/i386:/io sdl2-i386

s/i386/amd64 to build for amd64.
2020-04-29 21:37:51 -04:00
Dan Balasescu 0729f73aa1
Merge pull request #1 from swoolcock/clean
Clean up for osu!framework
2020-04-16 21:05:18 +09:00
Shane Woolcock 67a6fb4532 Remove Makefile 2020-04-16 19:52:47 +09:30
Shane Woolcock ad755967f3 Add appveyor.yml 2020-04-16 19:35:47 +09:30
Shane Woolcock 19be86c467 Add more NuGet info 2020-04-16 19:34:04 +09:30
Shane Woolcock 2994716b99 Remove gitlab CI 2020-04-15 17:38:50 +09:30
Shane Woolcock ef9c50923a Add native libraries 2020-04-15 17:36:20 +09:30
Shane Woolcock 849d398070 Remove SDL2 extensions 2020-04-15 17:36:00 +09:30
Shane Woolcock 0f73183733 Only target netstandard2.0 2020-04-15 17:35:16 +09:30
Caleb Cornett 8d0760016b
SDL 2.0.12 Update (#167)
* Add SDL_Metal APIs
* Added LockTextureToSurface functions
* Add SDL_HasARMSIMD and SDL_GameControllerType enum/functions
* Updated enum names, added missing macros, added new hints
* Added Get/SetPlayerIndex functions
* Standardize comment format
* Added SDL_Get/SetTextureScaleMode
* TTF updates
* Added IMG_Animation API to SDL_image
* SDL_mixer updates
* Add SDL_BLENDMODE_MUL
* Added hints and SDL_GetAndroidSDKVersion
2020-03-10 16:41:58 -04:00
Todd York 11064cc128 Add SDL_SysWMinfo.info.win.hinstance 2020-03-10 09:57:44 -04:00
Ethan Lee e7d628f539 Allow .NET 4.0 projects to reference SDL2-CS.Core 2020-02-29 11:15:45 -05:00
Ethan Lee 6cb034a649 Expose SDL_memcpy 2020-01-19 10:57:16 -05:00
Ethan Lee 6a28ae8594 Fix SDL_AndroidGetExternalStorageState EntryPoint 2020-01-08 12:46:35 -05:00
Ethan Lee 8aa635b27f Happy New Year! 2020-01-01 11:08:04 -05:00
Caleb Cornett c6524e2eb4 Missed a few things from previous releases 2019-12-14 20:25:52 -04:00
meli 1a3556441e Fix leak in SDL_GetClipboardText() 2019-12-06 22:20:57 -05:00
Ethan Lee 1f35c7f2fd VS2010 app.config fix 2019-11-26 15:13:58 -05:00
Ethan Lee dc9d98a075 SDL2-CS.dll.config -> app.config 2019-10-27 01:31:27 -04:00
Ethan Lee 99a3123c42 Random tab sanitization 2019-10-23 10:14:09 -04:00
Ethan Lee 0b6091c655 Couple more size_t fixes 2019-10-23 10:09:45 -04:00
Ethan Lee 3185ae7eba RWops size_t fixes, remove unused unsafe keyword 2019-10-23 10:05:22 -04:00
James J. Kelly Jr 1c0c33ff5b Added additional RWops functions and partial SDL_RWops structure. 2019-10-23 09:48:39 -04:00
Nabile Rahmani eeadbf0709 Drop events are actually enabled by default. 2019-10-22 07:52:33 -04:00
James J. Kelly Jr 59b5620bd5 Added various CPU capability calls from SDL_cpuinfo.h 2019-10-21 15:46:42 -04:00
Ethan Lee 7aaf5e6203
Create FUNDING.yml 2019-10-11 14:32:36 -04:00
Caleb Cornett 499ad108b9 SDL_Vulkan_CreateSurface should use ulong 2019-08-31 18:05:31 -04:00
Caleb Cornett 80a13ba107 SDL 2.0.10 Updates (#157) 2019-07-25 18:31:13 -04:00
Caleb Cornett d0d0ae0071 Add SDL_HINT_TV_REMOTE_AS_JOYSTICK 2019-07-16 23:12:58 -04:00
Caleb Cornett 386ebcfcc9 Add SDL_HINT_IOS_HIDE_HOME_INDICATOR 2019-06-06 17:00:41 -04:00
Ethan Lee c787ad8f8d Return an empty string on, er, empty string 2019-05-29 16:57:34 -04:00
Caleb Cornett f4c767259f Added SDL_RenderGetMetal* functions 2019-05-03 14:47:32 -04:00
Ethan Lee 162bbe0ba4 Add SDL_GL_LoadLibrary 2019-04-11 18:55:48 -04:00
Ethan Lee d5b0e14cf5 INFINITY wasn't quite infinity enough 2019-02-24 11:42:42 -05:00
George Nemes cd4064203f Remove obsolete unmanaged type (#154) 2019-02-16 09:26:08 -05:00
Axolotl Maid Service 859737b1e1 Add windowID to SDL_DropEvent. 2018-11-28 18:54:49 -05:00
Ethan Lee 65d719a058 Allow DropEvent users to access UTF8_ToManaged 2018-11-27 09:53:36 -05:00
Caleb Cornett 0cd8f85918 Small fix for DisplayEventID 2018-11-18 22:16:20 -05:00
Ethan Lee b5a66888f5 2.0.9 2018-11-11 13:29:58 -05:00
Adam Becker 3819b959b6 Build in a release configuration before packaging. 2018-11-10 11:59:07 -05:00
tuxuser 93acf5457b Add SDL_UpdateYUVTexture
Add YUV specific UpdateYUVTexture function, available since SDL2 v2.0.1 (https://wiki.libsdl.org/SDL_UpdateYUVTexture)
2018-10-25 14:27:06 -04:00
Ethan Lee 48621907a2 SDL_system.h 2018-10-02 14:17:07 -04:00
Ethan Lee 292c0084a1 dmcs->mcs 2018-09-10 00:12:13 -04:00
Ethan Lee 9743aaef11 Remove .dll suffix from DllImports 2018-09-10 00:04:00 -04:00
Adam Becker 3672e94be5 gitlab-ci integration (#140) 2018-09-09 17:37:49 -04:00
Ethan Lee 0560581774 Missing event enums 2018-09-05 18:32:51 -04:00
shartte f5e19f2114 Add SDL_INIT_EVENTS for SDL_Init 2018-08-06 14:29:10 -04:00
smack0007 48e13433b3 Add overload to SDL_GL_SetAttribute which accepts the SDL_GLprofile enum to prevent having to cast. 2018-07-19 11:53:20 -04:00
Ethan Lee dd6f7face8 Use GetChars return value 2018-06-27 15:43:10 -04:00
Ethan Lee f26b55e8be stackalloc for UTF8_ToManaged 2018-06-27 14:45:27 -04:00
Nabile Rahmani a16e9951f7 Enable the optimise flag in Release configurations. 2018-06-17 10:10:52 -04:00
Ethan Lee 8e0cec49a0 Update PATCHLEVEL 2018-05-05 17:20:00 -04:00
Ethan Lee 03f0431995 __arglist is unsupported by BRUTE and .NET Native 2018-04-29 16:28:03 -04:00
Ethan Lee 99846d578c Fixes found by BRUTE 2018-04-25 11:51:21 -04:00
Ethan Lee 8e75771fca C# you idiot that struct is totally blittable 2018-03-30 11:15:48 -04:00
Ethan Lee 0f768e1c18 Fix SDL_GameControllerButtonBind layout 2018-03-30 10:43:46 -04:00
Ethan Lee bd3b64fe32 Fix for GetCallback function decls 2018-03-22 17:42:55 -04:00
Ethan Lee 9549b1c920 SDL_GL_GetProcAddress(IntPtr) 2018-03-22 17:00:23 -04:00
Ethan Lee 821c6aaf49 SDL_mixer 2.0.2 2018-02-25 11:12:06 -05:00
Ethan Lee c764309ae5 Dear CoreCLR team: Please fix this 2018-02-07 11:44:56 -05:00
Ethan Lee 5ec50891a3 Make ToNative null check similar to ToManaged null check 2018-01-15 21:57:30 -05:00
Keith Holman 77cffe2f92 When a null C# string is passed to UTF8_ToNative(), return a null pointer instead of an empty C string. 2018-01-15 14:18:50 -05:00
Ethan Lee ed4838b75d Typo fix (thanks @bplu4t2f!) 2017-12-16 12:35:32 -05:00
Keith Holman 64e2a93d55 Add bindings for the SDL_AUDIODEVICEADDED and SDL_AUDIODEVICEREMOVED events. 2017-12-05 21:10:32 -05:00
Ethan Lee 396299307f UnmanagedFunctionPointer attributes 2017-11-20 11:42:12 -05:00
Ethan Lee 41a2c5b93d Forgot that these are macros... :( 2017-11-18 20:55:37 -05:00
Ethan Lee 63aeac09ca SDL_image 2.0.2 2017-11-18 20:50:56 -05:00
Ethan Lee 14ef9e4643 WinRT hints 2017-11-14 20:02:35 -05:00
Ethan Lee d9bfc8b16a 2.0.7 2017-10-24 17:47:02 -04:00
Ethan Lee 2c3515f458 Core buildfix 2017-10-19 12:36:51 -04:00
Ethan Lee 795db4433d Replace LPUtf8StrMarshaler with internal UTF8 API 2017-10-19 12:30:01 -04:00
Ethan Lee 5785d3d464 Strip out the XML docs, replace with the basic IntPtr docs where appropriate.
Honestly this just got in the way and people know to refer to SDL's docs anyway.
2017-10-19 10:13:23 -04:00
Ethan Lee 11adade8c2 .NET Core 2.0 support! 2017-10-17 10:47:08 -04:00
Ethan Lee 912569d705 Remove junk from csproj 2017-10-17 10:45:46 -04:00
Ethan Lee 689dcf5342 SDL_WinRTRunApp 2017-10-11 09:15:17 -04:00
Ethan Lee f7dbc10af5 Revert "SDL_GL_SwapWindow now returns int"
This reverts commit cf7a5fa2a1.
2017-10-04 17:14:42 -04:00
Ethan Lee cf7a5fa2a1 SDL_GL_SwapWindow now returns int 2017-10-04 17:11:10 -04:00
Ethan Lee 0da7c81d81 2.0.6 Windows-only hints 2017-09-07 10:41:04 -04:00
Ethan Lee b9939c43e3 Fix TOUCH_MOUSE_EVENTS string 2017-09-07 10:38:49 -04:00
Ethan Lee 776b77c27f 2.0.6 pre-release changes 2017-09-07 10:37:23 -04:00
Ethan Lee 9cdd0079b4 Vulkan parameter type fixes 2017-08-31 20:56:29 -04:00
Ethan Lee dc98059905 ARB_create_context_robustness, KHR_no_error, Vulkan! 2017-08-31 16:21:39 -04:00
Ethan Lee 498a565eda SDL_Joystick/SDL_GameController updates from Hg 2017-07-28 13:21:20 -04:00
Jack Mott 705681d982 overload openaudio to allow null 2017-01-19 16:07:10 -05:00
Jack Mott d03071653d add SDL_UpdateTexture overload
Added an overload for SDL_UpdateTexture so that you can pass a null reference, which is allowed
by the SDL2 spec. Similar pattern already exists for SDL_RenderCopy
2017-01-19 09:45:45 -05:00
Ethan Lee 4ec65bc5a0 SDL_SetWindowInputFocus 2016-11-11 13:40:34 -05:00
Ethan Lee 8a51516de0 Add note about VS debugger silent exit 2016-10-24 17:12:49 -04:00
Ethan Lee a230993c4c 2.0.5 2016-10-20 10:25:04 -04:00
Ethan Lee 6f158b9f79 Fix SDL_BITSPERPIXEL 2016-08-17 15:19:22 -04:00
Ethan Lee cceef27e50 Removed QueryTexturePixels 2016-01-26 08:42:43 -05:00
Ethan Lee 9b6f16a238 SDL_GetDisplayName 2016-01-14 09:52:27 -05:00
Ethan Lee 8cf81bc2e6 Merge pull request #99 from dan200/master
Added bindings for SDL_PowerState and SDL_GetPowerInfo
2016-01-07 17:55:25 -05:00
Daniel Ratcliffe e3e22902e7 Added bindings for SDL_PowerState and SDL_GetPowerInfo 2016-01-07 22:34:21 +00:00
Ethan Lee c6fa4d1457 Happy New Year! 2016-01-04 11:55:36 -05:00
Ethan Lee d77d831acb Merge from sdl2-hg (2.0.4) 2016-01-04 11:49:39 -05:00
Ethan Lee 23e25a3b2d 2.0.4 2016-01-04 11:49:00 -05:00
Ethan Lee 1efc47ee26 SDL_FillRect overload 2015-12-30 19:16:29 -05:00
Ethan Lee a44c92397d .NET 3.5 fix 2015-12-30 19:14:29 -05:00
Ethan Lee 5d5f4154bb Case-sensitive output folders to match csproj 2015-12-16 18:35:18 -05:00
Ethan Lee 1c03cdfb2c Minor spacing fixes 2015-12-01 11:13:18 -05:00
Johannes Jacobs c2d58d61d5 Added SDL_RenderCopyEx overloads 2015-12-01 17:03:25 +01:00
Ethan Lee 0532deb9a6 Fix a couple SDL_pixels macros 2015-09-13 16:03:16 -04:00
Ethan Lee c41fcf5b19 Flags type sizes 2015-09-02 07:12:10 -04:00
Ethan Lee 2e9752838d Fix Win32 UTF8 marshaling 2015-07-20 10:03:42 -04:00
Ethan Lee 7f3d91e2e5 Minor API change 2015-07-19 14:31:39 -04:00
Ethan Lee dbffbe778b SDL 2.0.4 RC1 2015-06-13 19:15:08 -04:00
Ethan Lee 83012b9866 Happy New Year, wait what month is it 2015-06-13 18:43:03 -04:00
Elisée 62a28724f2 Fix SDLK_DELETE value: 0177 (octal), 127 (decimal) 2015-06-13 18:43:03 -04:00
Ethan Lee f29dbb7e4d Happy New Year, wait what month is it 2015-05-21 12:54:41 -04:00
Ethan Lee ec8bd4ab09 Merge pull request #84 from elisee/patch-1
Fix SDLK_DELETE value: must be 0177 (octal), 127 (decimal)
2015-01-05 20:23:17 -05:00
Elisée 2748a2f4e2 Fix SDLK_DELETE value: 0177 (octal), 127 (decimal) 2015-01-06 02:11:40 +01:00
Ethan Lee 6ca6862d7e A few SDL2_image RWops funcs 2014-12-27 22:15:02 -05:00
Ethan Lee 07d4d8a494 A few SDL2_image RWops funcs 2014-12-27 22:14:52 -05:00
Ethan Lee a273ea9a18 Render*Rect NULL overloads 2014-12-26 11:16:14 -05:00
David Barnett 7a248e2678 Added SDL_GetRendererOutputSize 2014-12-26 11:16:14 -05:00
Ethan Lee 784cda961f SDL_Render rendertarget funcs 2014-12-26 11:16:14 -05:00
Ethan Lee 9c475e36fa CreateSoftwareRenderer fix 2014-12-26 11:16:14 -05:00
David Barnett 818a5cb6e0 Fix SDL_GetScancodeFromKey signature 2014-12-26 11:16:14 -05:00
Ethan Lee 0834d434ec Render*Rect NULL overloads 2014-12-26 11:16:08 -05:00
Ethan Lee 1313fc8b66 Merge pull request #79 from zyphrus/master
Added SDL_GetRendererOutputSize
2014-12-06 18:58:04 -05:00
David Barnett 19b00a2345 Added SDL_GetRendererOutputSize 2014-12-07 12:55:56 +13:00
Ethan Lee 99f2688d2b SDL_Render rendertarget funcs 2014-12-04 20:01:57 -05:00
Ethan Lee 847df8350b CreateSoftwareRenderer fix 2014-11-18 10:26:32 -05:00
Ethan Lee 7386579667 Merge pull request #73 from zyphrus/master
Fix SDL_GetScancodeFromKey signature
2014-10-25 22:42:51 -04:00
David Barnett 471b3f9658 Fix SDL_GetScancodeFromKey signature 2014-10-26 15:36:18 +13:00
Ethan Lee 9a1f823bca 2.0.4 GUI backend additions 2014-10-18 12:50:39 -04:00
Ethan Lee e395a5114d 2.0.4 mouse additions 2014-10-18 12:39:00 -04:00
Ethan Lee 818830fc3a Overloads for GetMouseState 2014-10-18 12:36:44 -04:00
Ethan Lee df0b8c03d6 SDL_GetVersion can be public 2014-10-08 00:36:27 -04:00
Ethan Lee 92f293416d MiniTK has been removed. 2014-10-07 12:29:29 -04:00
Ethan Lee babac2a7f0 Update README for FNA name 2014-07-22 10:50:54 -04:00
Ethan Lee 34d66997f0 Finish SDL_timer.h 2014-07-16 10:23:25 -04:00
Ethan Lee f284899867 RWops doc fixes 2014-07-07 16:17:56 -04:00
Ethan Lee 650fa8e44a Merge pull request #68 from Villermen/patch-1
Make Mix_LoadWAV_RW public
2014-07-07 16:11:23 -04:00
Villermen 1b0674efbe Added comments to publicized method 2014-07-07 22:09:00 +02:00
Villermen 419a25e86d Make Mix_LoadWAV_RW public
It works just fine and other extension libraries have this RW function public too. Why does this one have to be private/internal?
2014-07-07 19:36:41 +02:00
Ethan Lee ed817aad60 Merge pull request #66 from Villermen/master
SDL_RenderGetScale & SDL_RenderSetScale
2014-06-25 19:31:45 -04:00
Villermen 3a4bc35646 Added SDL_RenderGetScale and SDL_RenderSetScale
Now with tabs!
2014-06-26 01:16:22 +02:00
Villermen d26d719d76 Added SDL_RenderGetScale and SDL_RenderSetScale 2014-06-26 01:11:11 +02:00
Ethan Lee b8baa22a1b SDL_JoystickIndex was a 1.2 function. 2014-06-24 20:18:08 -04:00
Ethan Lee a6665a6c08 MiniTK notes added to README. 2014-06-22 14:42:33 -04:00
Ethan Lee eaa4f366d0 Merge pull request #61 from nickgravelyn/master
Added SDL_Window[Get/Set]MinimumSize and SDL_Window[Get/Set]MaximumSize
2014-06-13 02:23:38 -04:00
Nick Gravelyn fbe2627fd4 Added SDL_Window[Get/Set]MinimumSize and SDL_Window[Get/Set]MaximumSize. 2014-06-12 22:51:38 -07:00
Ethan Lee ed8c91d2f3 Add Render[Get/Set]ClipRect (thanks Martin!) 2014-06-05 12:10:14 -04:00
Ethan Lee 7a39b5d49c Update .gitignore 2014-05-31 19:55:44 -04:00
Ethan Lee db291e6464 Merge pull request #59 from nickgravelyn/master
Added RWops versions of OpenFont to support loading TTFs from memory
2014-05-31 19:54:55 -04:00
Nick Gravelyn 37058ed972 Fixing comments. 2014-05-31 16:43:26 -07:00
Nick Gravelyn 07853258b4 Adding RWops comment 2014-05-31 16:42:33 -07:00
Nick Gravelyn 1c6261532c Added RWops versions of OpenFont to support loading TTFs from memory. 2014-05-31 16:16:28 -07:00
Ethan Lee 48bae22f0e Guid is a thing. Grumble. 2014-05-12 17:34:53 -04:00
Ethan Lee eb23cc18a7 Fix pszGUID string parameter 2014-05-12 15:47:41 -04:00
Ethan Lee 3ea9ae0ede Merge pull request #58 from nickgravelyn/master
Adding release build to Makefile
2014-05-09 10:13:30 -04:00
nickgravelyn 55c7c04b0b Adding proper -optimize flag to release build make target. 2014-05-08 23:02:10 -07:00
nickgravelyn 1a8273cdc2 Updating Makefile to include ability to produce release builds. 2014-05-08 22:59:15 -07:00
Ethan Lee a7fe72d17a Fix BlueLine merge 2014-05-05 10:24:26 -04:00
Ethan Lee b4ccfe1c96 Merge pull request #57 from SeanColombo/master
Additional method signature to allow BlitFramebufferFilter enum instead of ExtFramebufferBlit enum.
2014-05-01 11:56:08 -04:00
Sean Colombo 4ad42a1e9d Made it so that previous overloads were additional instead of replacements. Should be able to merge this upstream. 2014-05-01 11:44:27 -04:00
Sean Colombo 7d3217b375 Adding our custom changes to OpenGL which relate to framebuffers. We probably want to upstream this at some point. 2014-04-29 10:04:11 -04:00
Ethan Lee e8731efadb Merge pull request #55 from IntelOrca/master
Fix SDL_GetKeyFromScancode signature.
2014-03-26 12:20:53 -05:00
IntelOrca 713e25ab96 Fix SDL_GetKeyFromScancode signature. 2014-03-26 13:14:21 +00:00
Ethan Lee 67f4c81bb3 SDL 2.0.3 2014-03-15 20:37:47 -04:00
Ethan Lee 6899e6cdb0 Merge pull request #54 from tobiasschulz/master
.NET doesn't use dllmaps
2014-03-09 12:32:54 -04:00
Tobias Schulz f495b5318c .NET doesn't use dllmaps 2014-03-09 17:27:27 +01:00
Ethan Lee 43a1905edf Use OpenAL Soft! 2014-03-08 22:42:00 -05:00
Ethan Lee af13848840 Merge 'sdl2-hg - SDL2 2.0.2 2014-03-08 10:44:24 -05:00
Ethan Lee 21ab9a5d69 Added some public RWops entry points. 2014-03-07 11:02:35 -05:00
Ethan Lee 1055efcc34 Added some public RWops entry points. 2014-03-07 11:02:24 -05:00
Ethan Lee 404c4d583d AL_SOFT_MSADPCM is now a thing. 2014-03-05 10:06:09 -05:00
Ethan Lee 82cd690656 AL_SOFT_MSADPCM is now a thing. 2014-03-05 10:06:01 -05:00
Ethan Lee f7ba9ab3b7 Ryan added this back. 2014-03-04 11:21:04 -05:00
Ethan Lee a7b2d3de69 Whuh, we already got rid of this... 2014-03-02 17:41:21 -05:00
Ethan Lee 6d0456c99e Double click support from SDL 2.0.2 2014-03-02 07:42:17 -05:00
Ethan Lee 2e719b0650 SDL 2.0.2 update. Includes some extras as well. 2014-03-02 07:36:30 -05:00
babelshift 60454e8878 From libsdl 2.0.2 RC1 notes - The screensaver is now disabled by default, and there is a hint SDL_HINT_VIDEO_ALLOW_SCREENSAVER that can change that behavior. 2014-03-01 22:51:30 -05:00
babelshift a74f245fe6 From libsdl 2.0.2 RC1 notes - Added a hint SDL_HINT_MOUSE_RELATIVE_MODE_WARP to specify whether mouse relative mode should be emulated using mouse warping. 2014-03-01 22:46:13 -05:00
babelshift 8846dbcaa4 Added suo files to ignore 2014-03-01 22:41:26 -05:00
Ethan Lee 7dd378d866 Update for latest AL_EXT_MSADPCM changes 2014-03-01 06:01:58 -05:00
Ethan Lee cbf996466d Happy New Year, wait what day is it 2014-02-10 18:02:40 -05:00
Ethan Lee 6bf1984db9 SDL_BlitScaled name 2014-01-29 07:26:00 -05:00
Ethan Lee 0fb37403cd Mix_Chunk is not our problem. 2014-01-27 16:39:09 -05:00
Ethan Lee 4a37ca4387 Merge from babelshift 2014-01-12 15:18:50 -05:00
babelshift 078ef09a09 Adding missing hint to handle scale quality 2014-01-12 11:19:45 -05:00
Ethan Lee 63c194dd81 Add MSADPCM256 support 2013-12-02 23:39:57 -05:00
Ethan Lee 193b1db8cb Merge pull request #47 from luiscubal/master
Added SDL_RenderSetLogicalSize and SDL_RenderGetLogicalSize
2013-11-30 08:07:23 -08:00
Luís Reis 5caa264f85 Added SDL_RenderSetLogicalSize and SDL_RenderGetLogicalSize 2013-11-30 16:05:05 +00:00
Ethan Lee 062241ca82 SDL2_image has SavePNG, woohoo! 2013-11-18 11:28:32 -05:00
Ethan Lee f3ae14eb98 Change SDL2# project names. 2013-11-04 14:51:28 -05:00
Ethan Lee 70af91f844 Merge pull request #46 from jameson-ernst/master
Bind touch API
2013-10-29 03:00:02 -07:00
Jameson Ernst ff2d14d00b Rolled back config file 2013-10-28 17:26:04 -07:00
Jameson Ernst 191ce0ad89 Fixed typo in config 2013-10-28 15:43:16 -07:00
Jameson Ernst b5762af567 Bind touch API. Use frameworks on OS X 2013-10-28 13:09:42 -07:00
Ethan Lee 5b575f02a0 Fix EffectsExtension for lower-level TK. 2013-10-27 15:25:47 -04:00
Ethan Lee 3ce41e80ac Stick to AL.cs style for Buffer 2013-10-27 11:59:56 -04:00
Ethan Lee ac4ac4d299 AL_LOOP_POINTS_SOFT 2013-10-27 07:22:16 -04:00
Ethan Lee 1ffb95fa74 SDL_GetPlatform 2013-10-27 05:02:20 -04:00
Ethan Lee 4b61ff485a Merge pull request #45 from sulix/master
HighDPI support + odds and ends
2013-10-25 22:18:29 -07:00
David Gow acd92371fc HighDPI support + odds and ends
This patch adds support for the SDL HighDPI stuff (for MacOSX Retina
displays et al), as well as adding a few missing things from SDL 2.0.0
and SDL 2.0.1:
* HighDPI support (hint, window flag, SDL_GL_GetDrawableSize)
* SDL_TICKS_PASSED() macro
* SDL_GL_GetCurrentWindow()
* SDL_GL_GetCurrentContext()
* SDL_HINT_RENDER_DIRECT3D_THREADSAFE
* SDL_HINT_TIMER_RESOLUTION
2013-10-26 11:44:30 +08:00
Ethan Lee d1e5b4d1a0 2.0.1 2013-10-24 02:28:10 -04:00
Ethan Lee f154bab1d8 Add 2.0.1 remark to GetSystemRAM 2013-10-22 22:34:30 -04:00
Ethan Lee 1d1eebb5cc Merge pull request #43 from sulix/master
Add SDL_filesystem.h for SDL 2.0.1
2013-10-22 19:31:40 -07:00
David Gow cfec5bc59f Merge branch 'sdl2-hg' of https://github.com/flibitijibibo/SDL2-CS
Conflicts:
	src/SDL2.cs
2013-10-23 10:18:48 +08:00
David Gow 85dd4bbb6d Extend filesystem docs, remove LeaveAllocated 2013-10-23 10:16:27 +08:00
Ethan Lee 8facd9f0b0 Merge branch 'sdl2cs-system-ram' of git://github.com/babelshift/SDL2-CS into sdl2-hg 2013-10-22 20:26:23 -04:00
Justin Skiles 861f5b3df6 Fixed trailing space on line 3797. 2013-10-22 20:15:27 -04:00
Justin Skiles 29372e5fa4 Added binding to SDL_GetSystemRAM() in SDL_cpuinfo.h 2013-10-22 19:28:34 -04:00
David Gow 475b9b6787 Add SDL_filesystem.h for SDL 2.0.1 2013-10-22 15:06:27 +08:00
David Gow 15aa82b2df Add SDL_GL_FRAMEBUFFER_SRGB_CAPABLE (SDL bug 1985) 2013-10-21 10:14:24 +08:00
Ethan Lee 1459270321 AL_EXT_MSADPCM support 2013-10-08 23:50:54 -04:00
Ethan Lee e7f9b53796 Fix BlitSurface, add BlitSurfaceScaled 2013-09-29 05:45:58 -04:00
Melker Narikka 390a6c2cb3 Remember trailing whitespace? Me neither.
Doesn't touch MiniTK.
Went with a good ol'
	% git ls-files | grep -v MiniTK | xargs -d "\n" -r sed -i 's/[ \t]\+$//g'
2013-09-27 12:39:57 +00:00
Ethan Lee afdfc7e627 Merge pull request #39 from thefiddler/master
Added SDL_GLcontextFlags enumeration.
2013-09-27 05:23:28 -07:00
thefiddler 58a8d318ac Normalized whitespace (spaces -> tabs) 2013-09-27 11:18:54 +02:00
thefiddler 95f0f58b84 Added SDL_GLcontextFlags enumeration.
The SDL_GLcontextFlags enumeration contains the values that are used in the SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, ...). This is required for enabling the debug or robustness OpenGL profiles.
2013-09-26 23:03:10 +02:00
Ethan Lee 3f2eeba67f Merge pull request #37 from babelshift/sdl-locktexture-allow-null-rect
Adding overload for SDL_LockTexture to allow IntPtr.Zero for "rect" parameter
2013-09-02 13:55:41 -07:00
Justin Skiles 49f4419656 Forgot to save the file before pushing. Ugh. 2013-09-02 15:20:41 -04:00
Justin Skiles 552a8b5ead Adding overload for SDL_LockTexture to allow IntPtr.Zero in the "rect" parameter. SDL documentation states that passing NULL for this value will lock the entire texture." 2013-09-02 15:18:11 -04:00
Ethan Lee 68b9cdcea9 Merge pull request #36 from babelshift/sdl-textureaccess-static-typo-fix
Fixing typo in SDL_TextureAccess enumeration for member SDL_TEXTUREACCES...
2013-09-01 21:22:31 -07:00
Justin Skiles 080f4e6e2b Fixing typo in SDL_TextureAccess enumeration for member SDL_TEXTUREACCESS_STATIC (it was missing an 'S') 2013-09-02 00:16:46 -04:00
Ethan Lee 0b7cd87083 The union is a separate entity. 2013-09-01 16:37:48 -04:00
Ethan Lee 28ad7c171c SDL_GetWindowWMInfo() 2013-09-01 16:30:39 -04:00
Ethan Lee 657c78f956 Only disable 0169 warning where it is needed. And oh, look, it found a bug! 2013-09-01 16:24:44 -04:00
Ethan Lee 72735d2b8d SDL_syswm.h 2013-09-01 16:18:38 -04:00
Ethan Lee 29c51a3f9b Merge pull request #35 from babelshift/sdl2#-xml-docs
Started adding XML comments. This will be a long journey.
2013-08-31 14:54:10 -07:00
Justin Skiles c4bcd17f60 Started adding XML comments. This will be a long journey. 2013-08-31 15:37:23 -04:00
Ethan Lee 41885b1e80 SDL_systimer docs 2013-08-30 00:48:02 -04:00
Justin Skiles dbe1891988 Adding methods to map to SDL_Delay and SDL_GetTicks in SDL_systimer.h 2013-08-29 23:20:39 -04:00
Ethan Lee 5b2d1c3aea Right. Like I said. Lunatic. 2013-08-28 06:39:52 -04:00
Ethan Lee 9b86627382 Doc cleanup. Because I am a lunatic. 2013-08-28 06:31:06 -04:00
Ethan Lee eaf552bad0 Merge pull request #33 from babelshift/RenderCopyOverload
Issue #32: Added overload for SDL_RenderCopy method
2013-08-28 03:25:11 -07:00
Justin Skiles ad6e7a7fa8 Added all source/destination null parameter overload variations for RenderCopy. Added function comments to explain their use. Fixed inconsistent tabbing. 2013-08-26 20:16:51 -04:00
Justin Skiles 796e0b9e54 Added overload to SDL_RenderCopy method to allow SourceRectangle to be passed as an IntPtr. This allows developers to pass IntPtr.Zero to take advantage of internal SDL default values for null rectangles. 2013-08-26 18:44:39 -04:00
Ethan Lee 10e0d51f85 Merge pull request #31 from gered/master
fixed reversed const definitions
2013-08-18 11:04:42 -07:00
gered 72dd621577 fixed reversed const definitions
See http://hg.libsdl.org/SDL/file/8f71b590aff6/include/SDL_events.h#l49
2013-08-18 14:01:55 -04:00
Ethan Lee 52931f5c4e Merge pull request #30 from jameson-ernst/master
Changed text input events to byte, added joystick background hint
2013-08-17 18:06:08 -07:00
Jameson Ernst 2d5f572ccf Changed text input events to byte instead of char
Added hint for background joystick events
2013-08-17 17:58:31 -07:00
Ethan Lee 482319f9b0 Grumble, C# structs... 2013-08-10 13:58:57 -04:00
Ethan Lee a9f3447df3 SDL_HapticLeftRight is in upstream! 2013-08-10 13:54:48 -04:00
Ethan Lee 65d95597bb Merge pull request #28 from ollipekka/master
Unified naming conventions with the native library and new enum for SDL_GLpofile.
2013-08-04 00:41:35 -07:00
ollipekka 82aae4d722 Fixed leading whitespace in indent. 2013-08-03 21:41:48 +03:00
ollipekka 70c4d742c8 Unified naming conventions with the native SDL2 library and introduced SDL_GLprofile. 2013-08-03 21:39:08 +03:00
Ethan Lee 5dd0738ebd Merge pull request #27 from jameson-ernst/master
Fixed gamma-ramp marshaling, more out params
2013-07-24 16:57:29 -07:00
Jameson Ernst c751ad0a03 Fixed gamma-ramp marshaling
more out params
2013-07-24 16:33:52 -07:00
Ethan Lee fe8cf68230 Fix SDL_RenderGetViewport entry 2013-07-15 12:36:03 -04:00
Ethan Lee 7a4820d660 Merge pull request #25 from jameson-ernst/master
Marshaling refinements and SDL_ShowMessageBox
2013-07-14 22:15:51 -07:00
Jameson Ernst 941209348a Change messagebox enum base types to uint
Change access level on messagebox internals to private
2013-07-14 22:14:06 -07:00
Jameson Ernst 51e907c959 Marshaling refinements to supplementary libraries 2013-07-14 21:24:26 -07:00
Jameson Ernst 423ace8dd8 Merge remote-tracking branch 'origin/master' 2013-07-14 20:28:05 -07:00
Jameson Ernst 92397d8a98 Added SDL_messagebox wrapper 2013-07-14 19:25:35 -07:00
Jameson Ernst 964f553e25 Marshaling refinements 2013-07-14 14:51:55 -07:00
Jameson Ernst b877b08553 Added obj/ to .gitignore 2013-07-14 12:20:15 -07:00
Ethan Lee 284c1cde76 Add SDL_messagebox.h 2013-07-13 14:21:00 -04:00
Ethan Lee f42d304eff Merge pull request #22 from jameson-ernst/master
UTF-8 Marshaling
2013-06-26 18:41:33 -07:00
Jameson Ernst 19d4602321 Don't free strings returned from SDL
Accept nulls for marshaling
2013-06-26 11:02:44 -07:00
Jameson Ernst 00f353693e Fixed leftover internal names 2013-06-25 23:51:05 -07:00
Jameson Ernst 4868a53683 Added UTF-8 support to supplementary libs
Style changes for consistency
2013-06-25 23:16:43 -07:00
Jameson Ernst 1c6c04f2e2 Apply UTF-8 marshaling to return values and removed extra wrapping layer 2013-06-25 22:12:29 -07:00
Jameson Ernst 1741030481 Added UTF-8 string marshaling 2013-06-25 21:36:38 -07:00
Jameson Ernst cbbc74bc76 Added .gitignore 2013-06-25 10:07:07 -07:00
Ethan Lee c84875d275 Merge pull request #21 from jameson-ernst/master
Add AnyCPU and x64 configurations
2013-06-23 16:45:12 -07:00
Jameson 2c3a759c6b Added x64 and AnyCPU configurations 2013-06-23 16:26:46 -07:00
Ethan Lee 0d5195c00c Add SDL_SetMainReady 2013-06-19 01:45:44 -04:00
Ethan Lee 9f0949be21 Fix SDL_SaveBMP 2013-05-24 07:37:37 -04:00
Ethan Lee 2658498408 Haptic effects seem to work now. 2013-05-09 14:54:47 -04:00
Ethan Lee 8876cc0117 More Haptic fixes... I think... 2013-05-08 23:07:58 -04:00
Ethan Lee 1b692d307d A couple fixes for Haptic 2013-05-08 21:14:32 -04:00
Ethan Lee 6ccf4ca414 Fix some VS debugger issues. 2013-05-04 15:46:10 -04:00
Ethan Lee ce89a55acf Use the proper Unsafe feature in the csproj 2013-05-02 13:58:24 -04:00
Ethan Lee 0023c59bd3 SetWindowFullscreen has more options than a bool 2013-04-29 06:52:32 -04:00
Ethan Lee 7c1bfdbaeb Fix SDL_BUTTON masks. 2013-04-28 18:58:30 -04:00
Ethan Lee 4c9d372611 Fix SDLK_ESCAPE 2013-04-28 17:57:47 -04:00
Ethan Lee 647e1b5efd Fix LoadWAV/FreeWAV 2013-04-28 16:39:27 -04:00
Ethan Lee 4f02e3d005 SDL_SetWindowBordered 2013-04-28 14:53:16 -04:00
Ethan Lee a69308c8d6 Woops, TTF minor version is definitely 0... 2013-04-17 19:09:15 -04:00
Ethan Lee d49903dd9e Clarity for VERSION_ATLEAST 2013-04-17 18:51:29 -04:00
Ethan Lee f154fc784b Add compiled version info for SDL2 libs. 2013-04-17 18:38:10 -04:00
Ethan Lee 5440f8ad22 SDL2 compatibility fixes. 2013-04-17 18:08:38 -04:00
Ethan Lee 2a2bdc2884 Beta 1 provides OpenGL/OpenAL support. 2013-04-17 12:03:02 -04:00
Ethan Lee ffab51b4a0 Document SDL_GL_GetProcAddress 2013-04-17 12:01:12 -04:00
Ethan Lee 015be72dad Use SDL2# license for SDL2_GraphicsContext 2013-04-17 03:51:29 -04:00
Ethan Lee 9ab9d57b23 Merge branch 'alpha-support' Strip Attribute bits 2013-04-17 03:41:52 -04:00
Ethan Lee fdbf76f308 Strip out needless Attribute bits 2013-04-17 03:41:40 -04:00
Ethan Lee 50f06c87fb Add MiniTK stuff to Makefile 2013-04-17 01:58:30 -04:00
Ethan Lee 61300054cc Merge branch 'alpha-support': clean dep 2013-04-17 01:57:42 -04:00
Ethan Lee 90c8e858f7 May as well clean with every build. 2013-04-17 01:56:45 -04:00
Ethan Lee b1fd6e4caf Merge branch 'alpha-support': Makefile 2013-04-17 01:53:30 -04:00
Ethan Lee a571614c3b Makefile for non-MonoDevelop users. 2013-04-17 01:53:14 -04:00
Ethan Lee 7ba9db97ea OpenGL support via OpenTK. 2013-04-16 18:11:29 -04:00
Ethan Lee 3eb90d9c52 Merge branch 'alpha-support': SDL_GL_GetProcAddress 2013-04-16 15:14:06 -04:00
Ethan Lee f6eff6c217 SDL_GL_GetProcAddress 2013-04-16 15:13:48 -04:00
Ethan Lee 21cb7cb7b7 OpenAL support via OpenTK. 2013-04-15 15:49:17 -04:00
37 changed files with 7876 additions and 1896 deletions

9
.github/dependabot.yml vendored Normal file
View file

@ -0,0 +1,9 @@
version: 2
updates:
- directory: /
package-ecosystem: github-actions
reviewers:
- marysaka
- TSRBerry
schedule:
interval: daily

92
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,92 @@
name: build-native
on:
workflow_dispatch:
inputs:
rev:
description: 'Ryujinx/SDL commit to build (this has to be a full commit sha, otherwise it will not work)'
required: true
# schedule:
# - cron: '0 0 * * *'
env:
BUILD_TYPE: Release
jobs:
build:
name: ${{ matrix.platform.name }}
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- { name: win-x64, os: windows-latest, arch: x64 }
# - { name: win-x86, os: windows-latest, arch: Win32 }
- { name: win-arm64, os: windows-latest, arch: ARM64 }
- { name: linux-x64, os: ubuntu-20.04, arch: amd64 }
# - { name: linux-x86, os: ubuntu-20.04, arch: i386 }
- { name: linux-arm64, os: ubuntu-20.04, arch: arm64 }
- { name: osx-x64, os: macos-latest, arch: x86_64 }
- { name: osx-arm64, os: macos-latest, arch: arm64 }
steps:
- name: Setup qemu static
uses: docker/setup-qemu-action@v3
if: runner.os == 'Linux'
- uses: actions/checkout@v4
with:
repository: Ryujinx/SDL
ref: ${{ github.event.inputs.rev }}
- uses: actions/checkout@v4
with:
path: 'SDL2-CS'
- name: Build and prepare release
run: SDL2-CS/ci/run.sh $PWD $PWD/SDL2-CS/native/${{ matrix.platform.name }} ${{ matrix.platform.arch }}
shell: bash
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.platform.name }}-binaries
path: install_output
- name: Create pull request
uses: peter-evans/create-pull-request@v4
with:
commit-message: Update ${{ matrix.platform.name }} SDL binaries
title: Update ${{ matrix.platform.name }} SDL binaries
body: This PR has been auto-generated to update the ${{ matrix.platform.name }} SDL binaries.
branch: update-${{ matrix.platform.name }}-binaries
path: 'SDL2-CS'
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
build-ios:
name: ios
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
repository: Ryujinx/SDL
ref: ${{ github.event.inputs.rev }}
- uses: actions/checkout@v4
with:
path: 'SDL2-CS'
- name: Build (iOS)
run: xcodebuild -project Xcode/SDL/SDL.xcodeproj -scheme xcFramework-iOS -configuration Release
- name: Prepare release directory (iOS)
run: mkdir -p SDL2-CS/native/ios
- name: Prepare release (iOS)
run: |
mkdir -p SDL2-CS/native/ios/SDL2.xcframework/ios-arm64/SDL2.framework;
mkdir -p SDL2-CS/native/ios/SDL2.xcframework/ios-arm64_x86_64-simulator/SDL2.framework;
cp Xcode/SDL/Products/SDL2.xcframework/Info.plist SDL2-CS/native/ios/SDL2.xcframework/Info.plist;
cp Xcode/SDL/Products/SDL2.xcframework/ios-arm64/SDL2.framework/SDL2 SDL2-CS/native/ios/SDL2.xcframework/ios-arm64/SDL2.framework/SDL2;
cp Xcode/SDL/Products/SDL2.xcframework/ios-arm64/SDL2.framework/Info.plist SDL2-CS/native/ios/SDL2.xcframework/ios-arm64/SDL2.framework/Info.plist;
cp Xcode/SDL/Products/SDL2.xcframework/ios-arm64_x86_64-simulator/SDL2.framework/SDL2 SDL2-CS/native/ios/SDL2.xcframework/ios-arm64_x86_64-simulator/SDL2.framework/SDL2;
cp Xcode/SDL/Products/SDL2.xcframework/ios-arm64_x86_64-simulator/SDL2.framework/Info.plist SDL2-CS/native/ios/SDL2.xcframework/ios-arm64_x86_64-simulator/SDL2.framework/Info.plist;
- name: Create pull request
uses: peter-evans/create-pull-request@v4
with:
commit-message: Update iOS SDL binaries
title: Update iOS SDL binaries
body: This PR has been auto-genereated to update the iOS SDL binaries
branch: update-ios-binaries
path: 'SDL2-CS'
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'

34
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,34 @@
name: Build
on:
workflow_dispatch:
inputs: {}
#push:
# branches: [ master ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- uses: nuget/setup-nuget@v1
with:
nuget-api-key: ${{ secrets.NUGET_API_KEY }}
nuget-version: '6.x'
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Pack & Publish
run: |
dotnet pack --version-suffix "build${{ github.run_number }}" -c Release .\SDL2-CS.csproj -o .
$file_to_publish = Get-ChildItem -Path $dir -Filter *.nupkg | Select -First 1
echo $file_to_publish
nuget push $file_to_publish -Source https://api.nuget.org/v3/index.json

5
.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
bin/
obj/
*.pidb
*.userprefs
*.suo

View file

@ -1,6 +1,6 @@
/* SDL2# - C# Wrapper for SDL2
*
* Copyright (c) 2013 Ethan Lee.
* Copyright (c) 2013-2021 Ethan Lee.
*
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from

17
README
View file

@ -14,17 +14,16 @@ http://wiki.libsdl.org/moin.fcg/FrontPage
About the C# Wrapper
--------------------
The C# wrapper was written to be used for MonoGame's desktop platforms. However,
this is written in a way that can be used for any general C# application.
The C# wrapper was written to be used for FNA's platform support. However, this
is written in a way that can be used for any general C# application.
The wrapper provides bindings for the following libraries:
- SDL2
- SDL2_gfx
- SDL2_image
- SDL2_mixer
- SDL2_ttf
We are in the process of adding bindings for OpenGL and OpenAL, via OpenTK.
Note that SDL2# will not provide every single SDL2 function. This is due to
limitations in the C# language that would cause major conflicts with the native
SDL2 library and its extensions.
@ -35,8 +34,10 @@ be exactly as they are done in the C library, with little-to-no concern for
names will indicate which library file the function/type/value exists in, and
everything else will be as close to the C version as technically possible.
Roadmap
-------
To see the current roadmap for SDL2#, visit the GitHub issues page:
About the Visual Studio Debugger
--------------------------------
When running C# applications under the Visual Studio debugger, native code that
names threads with the 0x406D1388 exception will silently exit. To prevent this
exception from being thrown by SDL, add this line before your SDL_Init call:
https://github.com/flibitijibibo/SDL2-CS/issues
SDL.SDL_SetHint(SDL.SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING, "1");

View file

@ -1,59 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{85480198-8711-4355-830E-72FD794AD3F6}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>SDL2</RootNamespace>
<AssemblyName>SDL2#</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
<ConsolePause>false</ConsolePause>
<additionalargs>/unsafe</additionalargs>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DebugType>none</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
<ConsolePause>false</ConsolePause>
<additionalargs>/unsafe</additionalargs>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<Compile Include="src\SDL2.cs" />
<Compile Include="src\SDL2_image.cs" />
<Compile Include="src\SDL2_mixer.cs" />
<Compile Include="src\SDL2_ttf.cs" />
</ItemGroup>
<ItemGroup>
<None Include="SDL2#.dll.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Folder Include="src\" />
</ItemGroup>
<ProjectExtensions>
<MonoDevelop>
<Properties>
<Policies>
<StandardHeader Text="" IncludeInNewFiles="False" />
</Policies>
</Properties>
</MonoDevelop>
</ProjectExtensions>
</Project>

View file

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="SDL2.dll" os="windows" target="SDL2.dll"/>
<dllmap dll="SDL2.dll" os="osx" target="libSDL2-2.0.0.dylib"/>
<dllmap dll="SDL2.dll" os="linux" target="libSDL2-2.0.so.0"/>
<dllmap dll="SDL2_image.dll" os="windows" target="SDL2_image.dll"/>
<dllmap dll="SDL2_image.dll" os="osx" target="libSDL2_image-2.0.0.dylib"/>
<dllmap dll="SDL2_image.dll" os="linux" target="libSDL2_image-2.0.so.0"/>
<dllmap dll="SDL2_mixer.dll" os="windows" target="SDL2_mixer.dll"/>
<dllmap dll="SDL2_mixer.dll" os="osx" target="libSDL2_mixer-2.0.0.dylib"/>
<dllmap dll="SDL2_mixer.dll" os="linux" target="libSDL2_mixer-2.0.so.0"/>
<dllmap dll="SDL2_ttf.dll" os="windows" target="SDL2_ttf.dll"/>
<dllmap dll="SDL2_ttf.dll" os="osx" target="libSDL2_ttf-2.0.0.dylib"/>
<dllmap dll="SDL2_ttf.dll" os="linux" target="libSDL2_ttf-2.0.so.0"/>
</configuration>

View file

@ -1,20 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SDL2#", "SDL2#.csproj", "{85480198-8711-4355-830E-72FD794AD3F6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{85480198-8711-4355-830E-72FD794AD3F6}.Debug|x86.ActiveCfg = Debug|x86
{85480198-8711-4355-830E-72FD794AD3F6}.Debug|x86.Build.0 = Debug|x86
{85480198-8711-4355-830E-72FD794AD3F6}.Release|x86.ActiveCfg = Release|x86
{85480198-8711-4355-830E-72FD794AD3F6}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = SDL2#.csproj
EndGlobalSection
EndGlobal

62
SDL2-CS.csproj Normal file
View file

@ -0,0 +1,62 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<OutputType>Library</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyTitle>SDL2#</AssemblyTitle>
<AssemblyName>SDL2-CS</AssemblyName>
<Description>libSDL2 bindings for C#</Description>
<RootNamespace>SDL2</RootNamespace>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<VersionPrefix>2.30.0</VersionPrefix>
</PropertyGroup>
<PropertyGroup Label="NuGet">
<Authors>marysaka &amp; ppy Pty Ltd &amp; flibitijibibo</Authors>
<Title>SDL2#</Title>
<PackageId>Ryujinx.SDL2-CS</PackageId>
<PackageProjectUrl>https://github.com/Ryujinx/SDL2-CS</PackageProjectUrl>
<RepositoryUrl>https://github.com/Ryujinx/SDL2-CS</RepositoryUrl>
</PropertyGroup>
<ItemGroup>
<Content Include="$(MSBuildThisFileDirectory)native\win-x64\SDL2.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<PackagePath>runtimes/win-x64/native</PackagePath>
<Pack>true</Pack>
</Content>
<Content Include="$(MSBuildThisFileDirectory)native\win-arm64\SDL2.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<PackagePath>runtimes/win-arm64/native</PackagePath>
<Pack>true</Pack>
</Content>
<Content Include="$(MSBuildThisFileDirectory)native\osx-x64\libSDL2.dylib">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<PackagePath>runtimes/osx-x64/native</PackagePath>
<Pack>true</Pack>
</Content>
<Content Include="$(MSBuildThisFileDirectory)native\osx-arm64\libSDL2.dylib">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<PackagePath>runtimes/osx-arm64/native</PackagePath>
<Pack>true</Pack>
</Content>
<Content Include="$(MSBuildThisFileDirectory)native\linux-x64\libSDL2.so">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<PackagePath>runtimes/linux-x64/native</PackagePath>
<Pack>true</Pack>
</Content>
<Content Include="$(MSBuildThisFileDirectory)native\linux-arm64\libSDL2.so">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<PackagePath>runtimes/linux-arm64/native</PackagePath>
<Pack>true</Pack>
</Content>
<Content Include="$(MSBuildThisFileDirectory)native\ios\**\*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<PackagePath>runtimes/ios/native</PackagePath>
<Pack>true</Pack>
</Content>
</ItemGroup>
<ItemGroup>
<Content Include="app.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>

32
SDL2-CS.sln Normal file
View file

@ -0,0 +1,32 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SDL2-CS", "SDL2-CS.csproj", "{85480198-8711-4355-830E-72FD794AD3F6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{85480198-8711-4355-830E-72FD794AD3F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{85480198-8711-4355-830E-72FD794AD3F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{85480198-8711-4355-830E-72FD794AD3F6}.Debug|x64.ActiveCfg = Debug|x64
{85480198-8711-4355-830E-72FD794AD3F6}.Debug|x64.Build.0 = Debug|x64
{85480198-8711-4355-830E-72FD794AD3F6}.Debug|x86.ActiveCfg = Debug|x86
{85480198-8711-4355-830E-72FD794AD3F6}.Debug|x86.Build.0 = Debug|x86
{85480198-8711-4355-830E-72FD794AD3F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{85480198-8711-4355-830E-72FD794AD3F6}.Release|Any CPU.Build.0 = Release|Any CPU
{85480198-8711-4355-830E-72FD794AD3F6}.Release|x64.ActiveCfg = Release|x64
{85480198-8711-4355-830E-72FD794AD3F6}.Release|x64.Build.0 = Release|x64
{85480198-8711-4355-830E-72FD794AD3F6}.Release|x86.ActiveCfg = Release|x86
{85480198-8711-4355-830E-72FD794AD3F6}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = SDL2-CS.csproj
EndGlobalSection
EndGlobal

6
app.config Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="SDL2" os="windows" target="SDL2.dll"/>
<dllmap dll="SDL2" os="osx" target="libSDL2.dylib"/>
<dllmap dll="SDL2" os="linux" target="libSDL2-2.0.so.0"/>
</configuration>

8
appveyor.yml Normal file
View file

@ -0,0 +1,8 @@
image: Visual Studio 2022
build_script:
- cmd: dotnet restore
- cmd: dotnet pack SDL2-CS.csproj -c:Release --include-symbols /p:Version=%APPVEYOR_BUILD_VERSION%
test: off
version: 1.0.{build}-alpha
artifacts:
- path: 'bin\Release\*.nupkg'

109
ci/compile.sh Executable file
View file

@ -0,0 +1,109 @@
#!/bin/bash
set -e
if [ "$#" -le 1 ]; then
echo "usage: <sdl_dir> <output_path> [build_arch]"
exit 1
fi
uname_system="$(uname -s)"
case "${uname_system}" in
Linux*) system_name=linux;;
Darwin*) system_name=macos;;
CYGWIN*) system_name=win;;
MINGW*) system_name=win;;
*) system_name="Unknown OS: ${uname_system}"
esac
export DEBIAN_FRONTEND=noninteractive
sdl_dir=$1
output_path=$2
build_arch=$3
mkdir -p $output_path
if [ -z "$3" ]; then
if [ $system_name == "linux" ]; then
build_arch=$(dpkg --print-architecture)
else
echo "ERROR - build_arch parameter needed on macOS and Windows"
exit 1
fi
fi
if command -v sudo &> /dev/null
then
SUDO=sudo
fi
if [[ $system_name == "linux" ]]; then
if [[ $build_arch == "i386" ]]; then
sudo dpkg --add-architecture i386
export CFLAGS=-m32
export CXXFLAGS=-m32
fi
$SUDO apt-get update -y
$SUDO apt-get install -y \
build-essential \
cmake \
ninja-build \
wayland-scanner++ \
wayland-protocols \
pkg-config:$build_arch \
libasound2-dev:$build_arch \
libdbus-1-dev:$build_arch \
libegl1-mesa-dev:$build_arch \
libgl1-mesa-dev:$build_arch \
libgles2-mesa-dev:$build_arch \
libglu1-mesa-dev:$build_arch \
libibus-1.0-dev:$build_arch \
libpulse-dev:$build_arch \
libsdl2-2.0-0:$build_arch \
libsndio-dev:$build_arch \
libudev-dev:$build_arch \
libwayland-dev:$build_arch \
libx11-dev:$build_arch \
libxcursor-dev:$build_arch \
libxext-dev:$build_arch \
libxi-dev:$build_arch \
libxinerama-dev:$build_arch \
libxkbcommon-dev:$build_arch \
libxrandr-dev:$build_arch \
libxss-dev:$build_arch \
libxt-dev:$build_arch \
libxv-dev:$build_arch \
libxxf86vm-dev:$build_arch \
libdrm-dev:$build_arch \
libgbm-dev:$build_arch \
libpulse-dev:$build_arch \
libhidapi-dev:$build_arch \
libwayland-client++0:$build_arch \
libwayland-cursor++0:$build_arch
extra_cmake_flags="-GNinja"
elif [[ $system_name == "macos" ]]; then
extra_cmake_flags="-DCMAKE_OSX_ARCHITECTURES=\"$build_arch\" -DCMAKE_OSX_DEPLOYMENT_TARGET=\"11.0\""
elif [[ $system_name == "win" ]]; then
extra_cmake_flags="-A $build_arch"
fi
pushd $sdl_dir
cmake -B build -DCMAKE_BUILD_TYPE=Release -DSDL_SHARED_ENABLED_BY_DEFAULT=ON -DSDL_STATIC_ENABLED_BY_DEFAULT=ON $extra_cmake_flags
cmake --build build/ --config Release
$SUDO cmake --install build/ --prefix install_output --config Release
mkdir -p $output_path
if [[ $system_name == "linux" ]]; then
cp install_output/lib/libSDL2-2.0.so.0 $output_path/libSDL2.so
elif [[ $system_name == "macos" ]]; then
cp install_output/lib/libSDL2-2.0.dylib $output_path/libSDL2.dylib
elif [[ $system_name == "win" ]]; then
cp install_output/bin/SDL2.dll $output_path/SDL2.dll
fi
popd

41
ci/run.sh Executable file
View file

@ -0,0 +1,41 @@
#!/bin/bash
set -e
if [ "$#" -le 2 ]; then
echo "usage: <sdl_dir> <output_path> <build_arch>"
exit 1
fi
uname_system="$(uname -s)"
case "${uname_system}" in
Linux*) system_name=linux;;
Darwin*) system_name=macos;;
CYGWIN*) system_name=win;;
MINGW*) system_name=win;;
*) system_name="Unknown OS: ${uname_system}"
esac
sdl_dir=$1
output_path=$2
build_arch=$3
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
mkdir -p $output_path
if [ $system_name == "linux" ] && [ $build_arch == "arm64" ]; then
if command -v podman &> /dev/null; then
DOCKER=podman
elif command -v docker &> /dev/null; then
DOCKER=docker
else
echo "ERROR - Missing docker/podman env, cannot crossbuild"
exit 1
fi
$DOCKER run --rm -v $SCRIPT_DIR:/scripts -v $output_path:/output -v $sdl_dir:/source -t arm64v8/ubuntu:focal bash /scripts/compile.sh /source /output $build_arch
else
$SCRIPT_DIR/compile.sh "$sdl_dir" "$output_path" "$build_arch"
fi

View file

@ -0,0 +1,19 @@
FROM debian:jessie
# We build on Jessie, but libwayland-dev and wayland-protocols are only in
# Stretch and later.
COPY stretch-package-pins /etc/apt/preferences.d/stretch
# Packages are from https://hg.libsdl.org/SDL/file/default/docs/README-linux.md
RUN echo deb http://deb.debian.org/debian/ stretch main > /etc/apt/sources.list.d/stretch.list && \
echo deb http://security.debian.org/debian-security stretch/updates main >> /etc/apt/sources.list.d/stretch.list && \
apt-get update && \
apt-get install -y build-essential mercurial make cmake autoconf automake \
libtool libasound2-dev libpulse-dev libaudio-dev libx11-dev libxext-dev \
libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev \
libxss-dev libgl1-mesa-dev libesd0-dev libdbus-1-dev libudev-dev \
libgles1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libibus-1.0-dev \
fcitx-libs-dev libsamplerate0-dev libsndio-dev libwayland-dev \
libxkbcommon-dev wayland-protocols
ENTRYPOINT ["/entry"]

View file

@ -0,0 +1,19 @@
FROM i386/debian:jessie
# We build on Jessie, but libwayland-dev and wayland-protocols are only in
# Stretch and later.
COPY stretch-package-pins /etc/apt/preferences.d/stretch
# Packages are from https://hg.libsdl.org/SDL/file/default/docs/README-linux.md
RUN echo deb http://deb.debian.org/debian/ stretch main > /etc/apt/sources.list.d/stretch.list && \
echo deb http://security.debian.org/debian-security stretch/updates main >> /etc/apt/sources.list.d/stretch.list && \
apt-get update && \
apt-get install -y build-essential mercurial make cmake autoconf automake \
libtool libasound2-dev libpulse-dev libaudio-dev libx11-dev libxext-dev \
libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev \
libxss-dev libgl1-mesa-dev libesd0-dev libdbus-1-dev libudev-dev \
libgles1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libibus-1.0-dev \
fcitx-libs-dev libsamplerate0-dev libsndio-dev libwayland-dev \
libxkbcommon-dev wayland-protocols
ENTRYPOINT ["/entry"]

11
linux-build/compile Executable file
View file

@ -0,0 +1,11 @@
#!/bin/bash
set -euf -o pipefail
cd /src
rm -rf build
mkdir build
cd build
../configure --prefix=/io
make -j$(nproc)
make install

View file

@ -0,0 +1,27 @@
Package: *
Pin: release n=stretch
Pin-Priority: 50
Package: libwayland-dev
Pin: release n=stretch
Pin-Priority: 800
Package: libwayland-bin
Pin: release n=stretch
Pin-Priority: 800
Package: libwayland-client0
Pin: release n=stretch
Pin-Priority: 800
Package: libwayland-cursor0
Pin: release n=stretch
Pin-Priority: 800
Package: libwayland-server0
Pin: release n=stretch
Pin-Priority: 800
Package: wayland-protocols
Pin: release n=stretch
Pin-Priority: 800

View file

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AvailableLibraries</key>
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>SDL2.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>SDL2.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
<key>XCFrameworkFormatVersion</key>
<string>1.0</string>
</dict>
</plist>

Binary file not shown.

Binary file not shown.

BIN
native/linux-x64/libSDL2.so Executable file

Binary file not shown.

BIN
native/linux-x86/libSDL2.so Executable file

Binary file not shown.

BIN
native/osx-arm64/libSDL2.dylib Executable file

Binary file not shown.

BIN
native/osx-x64/libSDL2.dylib Executable file

Binary file not shown.

BIN
native/win-arm64/SDL2.dll Normal file

Binary file not shown.

BIN
native/win-x64/SDL2.dll Executable file

Binary file not shown.

BIN
native/win-x86/SDL2.dll Executable file

Binary file not shown.

File diff suppressed because it is too large Load diff

390
src/SDL2_gfx.cs Normal file
View file

@ -0,0 +1,390 @@
#region License
/* SDL2# - C# Wrapper for SDL2
*
* Copyright (c) 2013-2021 Ethan Lee.
*
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from
* the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software in a
* product, an acknowledgment in the product documentation would be
* appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*
* Ethan "flibitijibibo" Lee <flibitijibibo@flibitijibibo.com>
*
*/
#endregion
#region Using Statements
using System;
using System.Runtime.InteropServices;
#endregion
namespace SDL2
{
public static class SDL_gfx
{
#region SDL2# Variables
/* Used by DllImport to load the native library. */
private const string nativeLibName = "SDL2_gfx";
#endregion
public const double M_PI = 3.1415926535897932384626433832795;
#region SDL2_gfxPrimitives.h
public const uint SDL2_GFXPRIMITIVES_MAJOR = 1;
public const uint SDL2_GFXPRIMITIVES_MINOR = 0;
public const uint SDL2_GFXPRIMITIVES_MICRO = 1;
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int pixelColor(IntPtr renderer, short x, short y, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int pixelRGBA(IntPtr renderer, short x, short y, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int hlineColor(IntPtr renderer, short x1, short x2, short y, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int hlineRGBA(IntPtr renderer, short x1, short x2, short y, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int vlineColor(IntPtr renderer, short x, short y1, short y2, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int vlineRGBA(IntPtr renderer, short x, short y1, short y2, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int rectangleColor(IntPtr renderer, short x1, short y1, short x2, short y2, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int rectangleRGBA(IntPtr renderer, short x1, short y1, short x2, short y2, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int roundedRectangleColor(IntPtr renderer, short x1, short y1, short x2, short y2, short rad, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int roundedRectangleRGBA(IntPtr renderer, short x1, short y1, short x2, short y2, short rad, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int boxColor(IntPtr renderer, short x1, short y1, short x2, short y2, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int boxRGBA(IntPtr renderer, short x1, short y1, short x2, short y2, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int roundedBoxColor(IntPtr renderer, short x1, short y1, short x2, short y2, short rad, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int roundedBoxRGBA(IntPtr renderer, short x1, short y1, short x2, short y2, short rad, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int lineColor(IntPtr renderer, short x1, short y1, short x2, short y2, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int lineRGBA(IntPtr renderer, short x1, short y1, short x2, short y2, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int aalineColor(IntPtr renderer, short x1, short y1, short x2, short y2, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int aalineRGBA(IntPtr renderer, short x1, short y1, short x2, short y2, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int thickLineColor(IntPtr renderer, short x1, short y1, short x2, short y2, byte width, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int thickLineRGBA(IntPtr renderer, short x1, short y1, short x2, short y2, byte width, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int circleColor(IntPtr renderer, short x, short y, short rad, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int circleRGBA(IntPtr renderer, short x, short y, short rad, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int arcColor(IntPtr renderer, short x, short y, short rad, short start, short end, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int arcRGBA(IntPtr renderer, short x, short y, short rad, short start, short end, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int aacircleColor(IntPtr renderer, short x, short y, short rad, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int aacircleRGBA(IntPtr renderer, short x, short y, short rad, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int filledCircleColor(IntPtr renderer, short x, short y, short rad, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int filledCircleRGBA(IntPtr renderer, short x, short y, short rad, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int ellipseColor(IntPtr renderer, short x, short y, short rx, short ry, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int ellipseRGBA(IntPtr renderer, short x, short y, short rx, short ry, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int aaellipseColor(IntPtr renderer, short x, short y, short rx, short ry, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int aaellipseRGBA(IntPtr renderer, short x, short y, short rx, short ry, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int filledEllipseColor(IntPtr renderer, short x, short y, short rx, short ry, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int filledEllipseRGBA(IntPtr renderer, short x, short y, short rx, short ry, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int pieColor(IntPtr renderer, short x, short y, short rad, short start, short end, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int pieRGBA(IntPtr renderer, short x, short y, short rad, short start, short end, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int filledPieColor(IntPtr renderer, short x, short y, short rad, short start, short end, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int filledPieRGBA(IntPtr renderer, short x, short y, short rad, short start, short end, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int trigonColor(IntPtr renderer, short x1, short y1, short x2, short y2, short x3, short y3, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int trigonRGBA(IntPtr renderer, short x1, short y1, short x2, short y2, short x3, short y3, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int aatrigonColor(IntPtr renderer, short x1, short y1, short x2, short y2, short x3, short y3, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int aatrigonRGBA(IntPtr renderer, short x1, short y1, short x2, short y2, short x3, short y3, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int filledTrigonColor(IntPtr renderer, short x1, short y1, short x2, short y2, short x3, short y3, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int filledTrigonRGBA(IntPtr renderer, short x1, short y1, short x2, short y2, short x3, short y3, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int polygonColor(IntPtr renderer, [In] short[] vx, [In] short[] vy, int n, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int polygonRGBA(IntPtr renderer, [In] short[] vx, [In] short[] vy, int n, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int aapolygonColor(IntPtr renderer, [In] short[] vx, [In] short[] vy, int n, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int aapolygonRGBA(IntPtr renderer, [In] short[] vx, [In] short[] vy, int n, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int filledPolygonColor(IntPtr renderer, [In] short[] vx, [In] short[] vy, int n, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int filledPolygonRGBA(IntPtr renderer, [In] short[] vx, [In] short[] vy, int n, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int texturedPolygon(IntPtr renderer, [In] short[] vx, [In] short[] vy, int n, IntPtr texture, int texture_dx, int texture_dy);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int bezierColor(IntPtr renderer, [In] short[] vx, [In] short[] vy, int n, int s, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int bezierRGBA(IntPtr renderer, [In] short[] vx, [In] short[] vy, int n, int s, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void gfxPrimitivesSetFont([In] byte[] fontdata, uint cw, uint ch);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void gfxPrimitivesSetFontRotation(uint rotation);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int characterColor(IntPtr renderer, short x, short y, char c, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int characterRGBA(IntPtr renderer, short x, short y, char c, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int stringColor(IntPtr renderer, short x, short y, string s, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int stringRGBA(IntPtr renderer, short x, short y, string s, byte r, byte g, byte b, byte a);
#endregion
#region SDL2_rotozoom.h
public const int SMOOTHING_OFF = 0;
public const int SMOOTHING_ON = 1;
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr rotozoomSurface(IntPtr src, double angle, double zoom, int smooth);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr rotozoomSurfaceXY(IntPtr src, double angle, double zoomx, double zoomy, int smooth);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void rotozoomSurfaceSize(int width, int height, double angle, double zoom, out int dstwidth, out int dstheight);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void rotozoomSurfaceSizeXY(int width, int height, double angle, double zoomx, double zoomy, out int dstwidth, out int dstheight);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr zoomSurface(IntPtr src, double zoomx, double zoomy, int smooth);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void zoomSurfaceSize(int width, int height, double zoomx, double zoomy, out int dstwidth, out int dstheight);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr shrinkSurface(IntPtr src, int factorx, int factory);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr rotateSurface90Degrees(IntPtr src, int numClockwiseTurns);
#endregion
#region SDL2_framerate.h
public const int FPS_UPPER_LIMIT = 200;
public const int FPS_LOWER_LIMIT = 1;
public const int FPS_DEFAULT = 30;
[StructLayout(LayoutKind.Sequential)]
public struct FPSmanager
{
public uint framecount;
public float rateticks;
public uint baseticks;
public uint lastticks;
public uint rate;
}
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SDL_initFramerate(ref FPSmanager manager);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_setFramerate(ref FPSmanager manager, uint rate);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_getFramerate(ref FPSmanager manager);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_getFramecount(ref FPSmanager manager);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern uint SDL_framerateDelay(ref FPSmanager manager);
#endregion
#region SDL2_imageFilter.h
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterMMXdetect();
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SDL_imageFilterMMXoff();
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SDL_imageFilterMMXon();
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterAdd([In] byte[] src1, [In] byte[] src2, [Out] byte[] dest, uint length);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterMean([In] byte[] src1, [In] byte[] src2, [Out] byte[] dest, uint length);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterSub([In] byte[] src1, [In] byte[] src2, [Out] byte[] dest, uint length);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterAbsDiff([In] byte[] src1, [In] byte[] src2, [Out] byte[] dest, uint length);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterMult([In] byte[] src1, [In] byte[] src2, [Out] byte[] dest, uint length);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterMultNor([In] byte[] src1, [In] byte[] src2, [Out] byte[] dest, uint length);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterMultDivby2([In] byte[] src1, [In] byte[] src2, [Out] byte[] dest, uint length);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterMultDivby4([In] byte[] src1, [In] byte[] src2, [Out] byte[] dest, uint length);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterBitAnd([In] byte[] src1, [In] byte[] src2, [Out] byte[] dest, uint length);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterBitOr([In] byte[] src1, [In] byte[] src2, [Out] byte[] dest, uint length);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterDiv([In] byte[] src1, [In] byte[] src2, [Out] byte[] dest, uint length);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterBitNegation([In] byte[] src1, [Out] byte[] dest, uint length);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterAddByte([In] byte[] src1, [Out] byte[] dest, uint length, byte c);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterAddUint([In] byte[] src1, [Out] byte[] dest, uint length, uint c);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterAddByteToHalf([In] byte[] src1, [Out] byte[] dest, uint length, byte c);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterSubByte([In] byte[] src1, [Out] byte[] dest, uint length, byte c);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterSubUint([In] byte[] src1, [Out] byte[] dest, uint length, uint c);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterShiftRight([In] byte[] src1, [Out] byte[] dest, uint length, byte n);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterShiftRightUint([In] byte[] src1, [Out] byte[] dest, uint length, byte n);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterMultByByte([In] byte[] src1, [Out] byte[] dest, uint length, byte c);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterShiftRightAndMultByByte([In] byte[] src1, [Out] byte[] dest, uint length, byte n, byte c);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterShiftLeftByte([In] byte[] src1, [Out] byte[] dest, uint length, byte n);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterShiftLeftUint([In] byte[] src1, [Out] byte[] dest, uint length, byte n);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterShiftLeft([In] byte[] src1, [Out] byte[] dest, uint length, byte n);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterBinarizeUsingThreshold([In] byte[] src1, [Out] byte[] dest, uint length, byte t);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterClipToRange([In] byte[] src1, [Out] byte[] dest, uint length, byte tmin, byte tmax);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterNormalizeLinear([In] byte[] src1, [Out] byte[] dest, uint length, int cmin, int cmax, int nmin, int nmax);
#endregion
}
}

View file

@ -1,7 +1,7 @@
#region License
/* SDL2# - C# Wrapper for SDL2
*
* Copyright (c) 2013 Ethan Lee.
* Copyright (c) 2013-2021 Ethan Lee.
*
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from
@ -36,14 +36,22 @@ namespace SDL2
public static class SDL_image
{
#region SDL2# Variables
/* Used by DllImport to load the native library. */
private const string nativeLibName = "SDL2_image.dll";
private const string nativeLibName = "SDL2_image";
#endregion
#region SDL_image.h
/* Similar to the headers, this is the version we're expecting to be
* running with. You will likely want to check this somewhere in your
* program!
*/
public const int SDL_IMAGE_MAJOR_VERSION = 2;
public const int SDL_IMAGE_MINOR_VERSION = 0;
public const int SDL_IMAGE_PATCHLEVEL = 6;
[Flags]
public enum IMG_InitFlags
{
@ -52,48 +60,258 @@ namespace SDL2
IMG_INIT_TIF = 0x00000004,
IMG_INIT_WEBP = 0x00000008
}
[DllImport(nativeLibName, EntryPoint = "IMG_LinkedVersion")]
private static extern IntPtr INTERNAL_IMG_LinkedVersion();
public static SDL.SDL_version IMG_LinkedVersion()
public static void SDL_IMAGE_VERSION(out SDL.SDL_version X)
{
X.major = SDL_IMAGE_MAJOR_VERSION;
X.minor = SDL_IMAGE_MINOR_VERSION;
X.patch = SDL_IMAGE_PATCHLEVEL;
}
[DllImport(nativeLibName, EntryPoint = "IMG_Linked_Version", CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_IMG_Linked_Version();
public static SDL.SDL_version IMG_Linked_Version()
{
SDL.SDL_version result;
IntPtr result_ptr = INTERNAL_IMG_LinkedVersion();
IntPtr result_ptr = INTERNAL_IMG_Linked_Version();
result = (SDL.SDL_version) Marshal.PtrToStructure(
result_ptr,
result.GetType()
typeof(SDL.SDL_version)
);
return result;
}
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int IMG_Init(IMG_InitFlags flags);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void IMG_Quit();
/* IntPtr refers to an SDL_Surface* */
[DllImport(nativeLibName)]
public static extern IntPtr IMG_Load(
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)]
string file
[DllImport(nativeLibName, EntryPoint = "IMG_Load", CallingConvention = CallingConvention.Cdecl)]
private static extern unsafe IntPtr INTERNAL_IMG_Load(
byte* file
);
public static unsafe IntPtr IMG_Load(string file)
{
byte* utf8File = SDL.Utf8EncodeHeap(file);
IntPtr handle = INTERNAL_IMG_Load(
utf8File
);
Marshal.FreeHGlobal((IntPtr) utf8File);
return handle;
}
/* src refers to an SDL_RWops*, IntPtr to an SDL_Surface* */
/* THIS IS A PUBLIC RWops FUNCTION! */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr IMG_Load_RW(
IntPtr src,
int freesrc
);
/* src refers to an SDL_RWops*, IntPtr to an SDL_Surface* */
/* THIS IS A PUBLIC RWops FUNCTION! */
[DllImport(nativeLibName, EntryPoint = "IMG_LoadTyped_RW", CallingConvention = CallingConvention.Cdecl)]
private static extern unsafe IntPtr INTERNAL_IMG_LoadTyped_RW(
IntPtr src,
int freesrc,
byte* type
);
public static unsafe IntPtr IMG_LoadTyped_RW(
IntPtr src,
int freesrc,
string type
) {
int utf8TypeBufSize = SDL.Utf8Size(type);
byte* utf8Type = stackalloc byte[utf8TypeBufSize];
return INTERNAL_IMG_LoadTyped_RW(
src,
freesrc,
SDL.Utf8Encode(type, utf8Type, utf8TypeBufSize)
);
}
/* IntPtr refers to an SDL_Texture*, renderer to an SDL_Renderer* */
[DllImport(nativeLibName)]
public static extern IntPtr IMG_LoadTexture(
[DllImport(nativeLibName, EntryPoint = "IMG_LoadTexture", CallingConvention = CallingConvention.Cdecl)]
private static extern unsafe IntPtr INTERNAL_IMG_LoadTexture(
IntPtr renderer,
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)]
byte* file
);
public static unsafe IntPtr IMG_LoadTexture(
IntPtr renderer,
string file
) {
byte* utf8File = SDL.Utf8EncodeHeap(file);
IntPtr handle = INTERNAL_IMG_LoadTexture(
renderer,
utf8File
);
Marshal.FreeHGlobal((IntPtr) utf8File);
return handle;
}
/* renderer refers to an SDL_Renderer*.
* src refers to an SDL_RWops*.
* IntPtr to an SDL_Texture*.
*/
/* THIS IS A PUBLIC RWops FUNCTION! */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr IMG_LoadTexture_RW(
IntPtr renderer,
IntPtr src,
int freesrc
);
/* renderer refers to an SDL_Renderer*.
* src refers to an SDL_RWops*.
* IntPtr to an SDL_Texture*.
*/
/* THIS IS A PUBLIC RWops FUNCTION! */
[DllImport(nativeLibName, EntryPoint = "IMG_LoadTextureTyped_RW", CallingConvention = CallingConvention.Cdecl)]
private static extern unsafe IntPtr INTERNAL_IMG_LoadTextureTyped_RW(
IntPtr renderer,
IntPtr src,
int freesrc,
byte* type
);
public static unsafe IntPtr IMG_LoadTextureTyped_RW(
IntPtr renderer,
IntPtr src,
int freesrc,
string type
) {
byte* utf8Type = SDL.Utf8EncodeHeap(type);
IntPtr handle = INTERNAL_IMG_LoadTextureTyped_RW(
renderer,
src,
freesrc,
utf8Type
);
Marshal.FreeHGlobal((IntPtr) utf8Type);
return handle;
}
/* IntPtr refers to an SDL_Surface* */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr IMG_ReadXPMFromArray(
[In()] [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPStr)]
string[] xpm
);
/* surface refers to an SDL_Surface* */
[DllImport(nativeLibName, EntryPoint = "IMG_SavePNG", CallingConvention = CallingConvention.Cdecl)]
private static extern unsafe int INTERNAL_IMG_SavePNG(
IntPtr surface,
byte* file
);
public static unsafe int IMG_SavePNG(IntPtr surface, string file)
{
byte* utf8File = SDL.Utf8EncodeHeap(file);
int result = INTERNAL_IMG_SavePNG(
surface,
utf8File
);
Marshal.FreeHGlobal((IntPtr) utf8File);
return result;
}
/* surface refers to an SDL_Surface*, dst to an SDL_RWops* */
/* THIS IS A PUBLIC RWops FUNCTION! */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int IMG_SavePNG_RW(
IntPtr surface,
IntPtr dst,
int freedst
);
/* surface refers to an SDL_Surface* */
[DllImport(nativeLibName, EntryPoint = "IMG_SaveJPG", CallingConvention = CallingConvention.Cdecl)]
private static extern unsafe int INTERNAL_IMG_SaveJPG(
IntPtr surface,
byte* file,
int quality
);
public static unsafe int IMG_SaveJPG(IntPtr surface, string file, int quality)
{
byte* utf8File = SDL.Utf8EncodeHeap(file);
int result = INTERNAL_IMG_SaveJPG(
surface,
utf8File,
quality
);
Marshal.FreeHGlobal((IntPtr) utf8File);
return result;
}
/* surface refers to an SDL_Surface*, dst to an SDL_RWops* */
/* THIS IS A PUBLIC RWops FUNCTION! */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int IMG_SaveJPG_RW(
IntPtr surface,
IntPtr dst,
int freedst,
int quality
);
public static string IMG_GetError()
{
return SDL.SDL_GetError();
}
public static void IMG_SetError(string fmtAndArglist)
{
SDL.SDL_SetError(fmtAndArglist);
}
#region Animated Image Support
/* This region is only available in 2.0.6 or higher. */
public struct IMG_Animation
{
public int w;
public int h;
public IntPtr frames; /* SDL_Surface** */
public IntPtr delays; /* int* */
}
/* IntPtr refers to an IMG_Animation* */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr IMG_LoadAnimation(
[In()] [MarshalAs(UnmanagedType.LPStr)]
string file
);
[DllImport(nativeLibName)]
public static extern int IMG_InvertAlpha(int on);
/* IntPtr refers to an SDL_Surface* */
[DllImport(nativeLibName)]
public static extern IntPtr IMG_ReadXPMFromArray(ref char[] xpm);
/* IntPtr refers to an IMG_Animation*, src to an SDL_RWops* */
/* THIS IS A PUBLIC RWops FUNCTION! */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr IMG_LoadAnimation_RW(
IntPtr src,
int freesrc
);
/* IntPtr refers to an IMG_Animation*, src to an SDL_RWops* */
/* THIS IS A PUBLIC RWops FUNCTION! */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr IMG_LoadAnimationTyped_RW(
IntPtr src,
int freesrc,
[In()] [MarshalAs(UnmanagedType.LPStr)]
string type
);
/* anim refers to an IMG_Animation* */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void IMG_FreeAnimation(IntPtr anim);
/* IntPtr refers to an IMG_Animation*, src to an SDL_RWops* */
/* THIS IS A PUBLIC RWops FUNCTION! */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr IMG_LoadGIFAnimation_RW(IntPtr src);
#endregion
#endregion
}
}

View file

@ -1,7 +1,7 @@
#region License
/* SDL2# - C# Wrapper for SDL2
*
* Copyright (c) 2013 Ethan Lee.
* Copyright (c) 2013-2021 Ethan Lee.
*
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from
@ -36,43 +36,60 @@ namespace SDL2
public static class SDL_mixer
{
#region SDL2# Variables
/* Used by DllImport to load the native library. */
private const string nativeLibName = "SDL2_mixer.dll";
private const string nativeLibName = "SDL2_mixer";
#endregion
#region SDL_mixer.h
/* Similar to the headers, this is the version we're expecting to be
* running with. You will likely want to check this somewhere in your
* program!
*/
public const int SDL_MIXER_MAJOR_VERSION = 2;
public const int SDL_MIXER_MINOR_VERSION = 0;
public const int SDL_MIXER_PATCHLEVEL = 5;
/* In C, you can redefine this value before including SDL_mixer.h.
* We're not going to allow this in SDL2#, since the value of this
* variable is persistent and not dependent on preprocessor ordering.
*/
public const int MIX_CHANNELS = 8;
public static readonly int MIX_DEFAULT_FREQUENCY = 22050;
public static readonly int MIX_DEFAULT_FREQUENCY = 44100;
public static readonly ushort MIX_DEFAULT_FORMAT =
BitConverter.IsLittleEndian ? SDL.AUDIO_S16LSB : SDL.AUDIO_S16MSB;
public static readonly int MIX_DEFAULT_CHANNELS = 2;
public static readonly byte MIX_MAX_VOLUME = 128;
[Flags]
public enum MIX_InitFlags
{
MIX_INIT_FLAC = 0x00000001,
MIX_INIT_MOD = 0x00000002,
MIX_INIT_MP3 = 0x00000004,
MIX_INIT_OGG = 0x00000008,
MIX_INIT_FLUIDSYNTH = 0x00000010,
MIX_INIT_MP3 = 0x00000008,
MIX_INIT_OGG = 0x00000010,
MIX_INIT_MID = 0x00000020,
MIX_INIT_OPUS = 0x00000040
}
public struct MIX_Chunk
{
public int allocated;
public IntPtr abuf; /* Uint8* */
public uint alen;
public byte volume;
}
public enum Mix_Fading
{
MIX_NO_FADING,
MIX_FADING_OUT,
MIX_FADING_IN
}
public enum Mix_MusicType
{
MUS_NONE,
@ -82,48 +99,53 @@ namespace SDL2
MUS_MID,
MUS_OGG,
MUS_MP3,
MUS_MP3_MAD,
MUS_MP3_MAD_UNUSED,
MUS_FLAC,
MUS_MODPLUG
MUS_MODPLUG_UNUSED,
MUS_OPUS
}
[StructLayout(LayoutKind.Sequential)]
public struct Mix_Chunk
{
public int allocated;
public IntPtr abuf; // Uint8*
public uint alen;
public byte volume;
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void MixFuncDelegate(
IntPtr udata, // void*
IntPtr stream, // Uint8*
int len
);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void Mix_EffectFunc_t(
int chan,
IntPtr stream, // void*
int len,
IntPtr udata // void*
);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void Mix_EffectDone_t(
int chan,
IntPtr udata // void*
);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void MusicFinishedDelegate();
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void ChannelFinishedDelegate(int channel);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate int SoundFontDelegate(
IntPtr a, // const char*
IntPtr b // void*
);
[DllImport(nativeLibName, EntryPoint = "MIX_Linked_Version")]
public static void SDL_MIXER_VERSION(out SDL.SDL_version X)
{
X.major = SDL_MIXER_MAJOR_VERSION;
X.minor = SDL_MIXER_MINOR_VERSION;
X.patch = SDL_MIXER_PATCHLEVEL;
}
[DllImport(nativeLibName, EntryPoint = "MIX_Linked_Version", CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_MIX_Linked_Version();
public static SDL.SDL_version MIX_Linked_Version()
{
@ -131,185 +153,261 @@ namespace SDL2
IntPtr result_ptr = INTERNAL_MIX_Linked_Version();
result = (SDL.SDL_version) Marshal.PtrToStructure(
result_ptr,
result.GetType()
typeof(SDL.SDL_version)
);
return result;
}
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_Init(MIX_InitFlags flags);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Mix_Quit();
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_OpenAudio(
int frequency,
ushort format,
int channels,
int chunksize
);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_AllocateChannels(int numchans);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_QuerySpec(
ref int frequency,
ref ushort format,
ref int channels
out int frequency,
out ushort format,
out int channels
);
/* These are for Mix_LoadWAV, which is a macro in the C header.
* THIS IS AN RWops FUNCTION!
*/
/* IntPtr refers to a Mix_Chunk* */
[DllImport(nativeLibName, EntryPoint = "Mix_LoadWAV_RW")]
private static extern IntPtr INTERNAL_Mix_LoadWAV_RW(
/* src refers to an SDL_RWops*, IntPtr to a Mix_Chunk* */
/* THIS IS A PUBLIC RWops FUNCTION! */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr Mix_LoadWAV_RW(
IntPtr src,
int freesrc
);
/* IntPtr refers to a Mix_Chunk* */
/* This is an RWops macro in the C header. */
public static IntPtr Mix_LoadWAV(string file)
{
IntPtr rwops = SDL.INTERNAL_SDL_RWFromFile(file, "rb");
return INTERNAL_Mix_LoadWAV_RW(rwops, 1);
IntPtr rwops = SDL.SDL_RWFromFile(file, "rb");
return Mix_LoadWAV_RW(rwops, 1);
}
/* IntPtr refers to a Mix_Music* */
[DllImport(nativeLibName)]
public static extern IntPtr Mix_LoadMUS(
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)]
string file
[DllImport(nativeLibName, EntryPoint = "Mix_LoadMUS", CallingConvention = CallingConvention.Cdecl)]
private static extern unsafe IntPtr INTERNAL_Mix_LoadMUS(
byte* file
);
public static unsafe IntPtr Mix_LoadMUS(string file)
{
byte* utf8File = SDL.Utf8EncodeHeap(file);
IntPtr handle = INTERNAL_Mix_LoadMUS(
utf8File
);
Marshal.FreeHGlobal((IntPtr) utf8File);
return handle;
}
/* IntPtr refers to a Mix_Chunk* */
[DllImport(nativeLibName)]
public static extern IntPtr Mix_QuickLoad_WAV(byte[] mem);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr Mix_QuickLoad_WAV(
[In()] [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.U1)]
byte[] mem
);
/* IntPtr refers to a Mix_Chunk* */
[DllImport(nativeLibName)]
public static extern Mix_Chunk Mix_QuickLoad_RAW(byte[] mem, uint len);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr Mix_QuickLoad_RAW(
[In()] [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.U1, SizeParamIndex = 1)]
byte[] mem,
uint len
);
/* chunk refers to a Mix_Chunk* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Mix_FreeChunk(IntPtr chunk);
/* music refers to a Mix_Music* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Mix_FreeMusic(IntPtr music);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_GetNumChunkDecoders();
[DllImport(nativeLibName, EntryPoint = "Mix_GetChunkDecoder")]
[DllImport(nativeLibName, EntryPoint = "Mix_GetChunkDecoder", CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_Mix_GetChunkDecoder(int index);
public static string Mix_GetChunkDecoder(int index)
{
return Marshal.PtrToStringAnsi(
return SDL.UTF8_ToManaged(
INTERNAL_Mix_GetChunkDecoder(index)
);
}
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_GetNumMusicDecoders();
[DllImport(nativeLibName, EntryPoint = "Mix_GetMusicDecoder")]
[DllImport(nativeLibName, EntryPoint = "Mix_GetMusicDecoder", CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_Mix_GetMusicDecoder(int index);
public static string Mix_GetMusicDecoder(int index)
{
return Marshal.PtrToStringAnsi(
return SDL.UTF8_ToManaged(
INTERNAL_Mix_GetMusicDecoder(index)
);
}
/* music refers to a Mix_Music* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Mix_MusicType Mix_GetMusicType(IntPtr music);
[DllImport(nativeLibName)]
/* music refers to a Mix_Music*
* Only available in 2.0.5 or higher.
*/
[DllImport(nativeLibName, EntryPoint = "Mix_GetMusicTitle", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr INTERNAL_Mix_GetMusicTitle(IntPtr music);
public static string Mix_GetMusicTitle(IntPtr music)
{
return SDL.UTF8_ToManaged(
INTERNAL_Mix_GetMusicTitle(music)
);
}
/* music refers to a Mix_Music*
* Only available in 2.0.5 or higher.
*/
[DllImport(nativeLibName, EntryPoint = "Mix_GetMusicTitleTag", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr INTERNAL_Mix_GetMusicTitleTag(IntPtr music);
public static string Mix_GetMusicTitleTag(IntPtr music)
{
return SDL.UTF8_ToManaged(
INTERNAL_Mix_GetMusicTitleTag(music)
);
}
/* music refers to a Mix_Music*
* Only available in 2.0.5 or higher.
*/
[DllImport(nativeLibName, EntryPoint = "Mix_GetMusicArtistTag", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr INTERNAL_Mix_GetMusicArtistTag(IntPtr music);
public static string Mix_GetMusicArtistTag(IntPtr music)
{
return SDL.UTF8_ToManaged(
INTERNAL_Mix_GetMusicArtistTag(music)
);
}
/* music refers to a Mix_Music*
* Only available in 2.0.5 or higher.
*/
[DllImport(nativeLibName, EntryPoint = "Mix_GetMusicAlbumTag", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr INTERNAL_Mix_GetMusicAlbumTag(IntPtr music);
public static string Mix_GetMusicAlbumTag(IntPtr music)
{
return SDL.UTF8_ToManaged(
INTERNAL_Mix_GetMusicAlbumTag(music)
);
}
/* music refers to a Mix_Music*
* Only available in 2.0.5 or higher.
*/
[DllImport(nativeLibName, EntryPoint = "Mix_GetMusicCopyrightTag", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr INTERNAL_Mix_GetMusicCopyrightTag(IntPtr music);
public static string Mix_GetMusicCopyrightTag(IntPtr music)
{
return SDL.UTF8_ToManaged(
INTERNAL_Mix_GetMusicCopyrightTag(music)
);
}
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Mix_SetPostMix(
MixFuncDelegate mix_func,
IntPtr arg // void*
);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Mix_HookMusic(
MixFuncDelegate mix_func,
IntPtr arg // void*
);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Mix_HookMusicFinished(
MusicFinishedDelegate music_finished
);
/* IntPtr refers to a void* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr Mix_GetMusicHookData();
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Mix_ChannelFinished(
ChannelFinishedDelegate channel_finished
);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_RegisterEffect(
int chan,
Mix_EffectFunc_t f,
Mix_EffectDone_t d,
IntPtr arg // void*
);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_UnregisterEffect(
int channel,
Mix_EffectFunc_t f
);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_UnregisterAllEffects(int channel);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_SetPanning(
int channel,
byte left,
byte right
);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_SetPosition(
int channel,
short angle,
byte distance
);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_SetDistance(int channel, byte distance);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_SetReverseStereo(int channel, int flip);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_ReserveChannels(int num);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_GroupChannel(int which, int tag);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_GroupChannels(int from, int to, int tag);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_GroupAvailable(int tag);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_GroupCount(int tag);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_GroupOldest(int tag);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_GroupNewer(int tag);
/* chunk refers to a Mix_Chunk* */
public static int Mix_PlayChannel(
int channel,
@ -318,37 +416,37 @@ namespace SDL2
) {
return Mix_PlayChannelTimed(channel, chunk, loops, -1);
}
/* chunk refers to a Mix_Chunk* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_PlayChannelTimed(
int channel,
IntPtr chunk,
int loops,
int ticks
);
/* music refers to a Mix_Music* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_PlayMusic(IntPtr music, int loops);
/* music refers to a Mix_Music* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_FadeInMusic(
IntPtr music,
int loops,
int ms
);
/* music refers to a Mix_Music* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_FadeInMusicPos(
IntPtr music,
int loops,
int ms,
double position
);
/* chunk refers to a Mix_Chunk* */
public static int Mix_FadeInChannel(
int channel,
@ -358,9 +456,9 @@ namespace SDL2
) {
return Mix_FadeInChannelTimed(channel, chunk, loops, ms, -1);
}
/* chunk refers to a Mix_Chunk* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_FadeInChannelTimed(
int channel,
IntPtr chunk,
@ -368,115 +466,201 @@ namespace SDL2
int ms,
int ticks
);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_Volume(int channel, int volume);
/* chunk refers to a Mix_Chunk* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_VolumeChunk(
IntPtr chunk,
int volume
);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_VolumeMusic(int volume);
[DllImport(nativeLibName)]
/* music refers to a Mix_Music*
* Only available in 2.0.5 or higher.
*/
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_GetVolumeMusicStream(IntPtr music);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_HaltChannel(int channel);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_HaltGroup(int tag);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_HaltMusic();
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_ExpireChannel(int channel, int ticks);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_FadeOutChannel(int which, int ms);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_FadeOutGroup(int tag, int ms);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_FadeOutMusic(int ms);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Mix_Fading Mix_FadingMusic();
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Mix_Fading Mix_FadingChannel(int which);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Mix_Pause(int channel);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Mix_Resume(int channel);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_Paused(int channel);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Mix_PauseMusic();
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Mix_ResumeMusic();
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Mix_RewindMusic();
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_PausedMusic();
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_SetMusicPosition(double position);
[DllImport(nativeLibName)]
/* music refers to a Mix_Music*
* Only available in 2.0.5 or higher.
*/
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern double Mix_GetMusicPosition(IntPtr music);
/* music refers to a Mix_Music*
* Only available in 2.0.5 or higher.
*/
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern double Mix_MusicDuration(IntPtr music);
/* music refers to a Mix_Music*
* Only available in 2.0.5 or higher.
*/
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern double Mix_GetMusicLoopStartTime(IntPtr music);
/* music refers to a Mix_Music*
* Only available in 2.0.5 or higher.
*/
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern double Mix_GetMusicLoopEndTime(IntPtr music);
/* music refers to a Mix_Music*
* Only available in 2.0.5 or higher.
*/
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern double Mix_GetMusicLoopLengthTime(IntPtr music);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_Playing(int channel);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_PlayingMusic();
[DllImport(nativeLibName)]
public static extern int Mix_SetMusicCMD(
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)]
string command
[DllImport(nativeLibName, EntryPoint = "Mix_SetMusicCMD", CallingConvention = CallingConvention.Cdecl)]
private static extern unsafe int INTERNAL_Mix_SetMusicCMD(
byte* command
);
[DllImport(nativeLibName)]
public static unsafe int Mix_SetMusicCMD(string command)
{
byte* utf8Cmd = SDL.Utf8EncodeHeap(command);
int result = INTERNAL_Mix_SetMusicCMD(
utf8Cmd
);
Marshal.FreeHGlobal((IntPtr) utf8Cmd);
return result;
}
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_SetSynchroValue(int value);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_GetSynchroValue();
[DllImport(nativeLibName)]
public static extern int Mix_SetSoundFonts(
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)]
string paths
[DllImport(nativeLibName, EntryPoint = "Mix_SetSoundFonts", CallingConvention = CallingConvention.Cdecl)]
private static extern unsafe int INTERNAL_Mix_SetSoundFonts(
byte* paths
);
[DllImport(nativeLibName, EntryPoint = "Mix_GetSoundFonts")]
public static unsafe int Mix_SetSoundFonts(string paths)
{
byte* utf8Paths = SDL.Utf8EncodeHeap(paths);
int result = INTERNAL_Mix_SetSoundFonts(
utf8Paths
);
Marshal.FreeHGlobal((IntPtr) utf8Paths);
return result;
}
[DllImport(nativeLibName, EntryPoint = "Mix_GetSoundFonts", CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_Mix_GetSoundFonts();
public static string Mix_GetSoundFonts()
{
return Marshal.PtrToStringAnsi(INTERNAL_Mix_GetSoundFonts());
return SDL.UTF8_ToManaged(
INTERNAL_Mix_GetSoundFonts()
);
}
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_EachSoundFont(
SoundFontDelegate function,
IntPtr data // void*
);
/* Only available in 2.0.5 or later. */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_SetTimidityCfg(
[In()] [MarshalAs(UnmanagedType.LPStr)]
string path
);
/* Only available in 2.0.5 or later. */
[DllImport(nativeLibName, EntryPoint = "Mix_GetTimidityCfg", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr INTERNAL_Mix_GetTimidityCfg();
public static string Mix_GetTimidityCfg()
{
return SDL.UTF8_ToManaged(
INTERNAL_Mix_GetTimidityCfg()
);
}
/* IntPtr refers to a Mix_Chunk* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr Mix_GetChunk(int channel);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Mix_CloseAudio();
public static string Mix_GetError()
{
return SDL.SDL_GetError();
}
public static void Mix_SetError(string fmtAndArglist)
{
SDL.SDL_SetError(fmtAndArglist);
}
public static void Mix_ClearError()
{
SDL.SDL_ClearError();
}
#endregion
}
}
}

View file

@ -1,7 +1,7 @@
#region License
/* SDL2# - C# Wrapper for SDL2
*
* Copyright (c) 2013 Ethan Lee.
* Copyright (c) 2013-2021 Ethan Lee.
*
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from
@ -36,29 +36,45 @@ namespace SDL2
public static class SDL_ttf
{
#region SDL2# Variables
/* Used by DllImport to load the native library. */
private const string nativeLibName = "SDL2_ttf.dll";
private const string nativeLibName = "SDL2_ttf";
#endregion
#region SDL_ttf.h
/* Similar to the headers, this is the version we're expecting to be
* running with. You will likely want to check this somewhere in your
* program!
*/
public const int SDL_TTF_MAJOR_VERSION = 2;
public const int SDL_TTF_MINOR_VERSION = 0;
public const int SDL_TTF_PATCHLEVEL = 16;
public const int UNICODE_BOM_NATIVE = 0xFEFF;
public const int UNICODE_BOM_SWAPPED = 0xFFFE;
public const int TTF_STYLE_NORMAL = 0x00;
public const int TTF_STYLE_BOLD = 0x01;
public const int TTF_STYLE_ITALIC = 0x02;
public const int TTF_STYLE_UNDERLINE = 0x04;
public const int TTF_STYLE_STRIKETHROUGH = 0x08;
public const int TTF_HINTING_NORMAL = 0;
public const int TTF_HINTING_LIGHT = 1;
public const int TTF_HINTING_MONO = 2;
public const int TTF_HINTING_NONE = 3;
[DllImport(nativeLibName, EntryPoint = "TTF_LinkedVersion")]
public const int TTF_HINTING_NORMAL = 0;
public const int TTF_HINTING_LIGHT = 1;
public const int TTF_HINTING_MONO = 2;
public const int TTF_HINTING_NONE = 3;
public const int TTF_HINTING_LIGHT_SUBPIXEL = 4; /* >= 2.0.16 */
public static void SDL_TTF_VERSION(out SDL.SDL_version X)
{
X.major = SDL_TTF_MAJOR_VERSION;
X.minor = SDL_TTF_MINOR_VERSION;
X.patch = SDL_TTF_PATCHLEVEL;
}
[DllImport(nativeLibName, EntryPoint = "TTF_LinkedVersion", CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_TTF_LinkedVersion();
public static SDL.SDL_version TTF_LinkedVersion()
{
@ -66,312 +82,688 @@ namespace SDL2
IntPtr result_ptr = INTERNAL_TTF_LinkedVersion();
result = (SDL.SDL_version) Marshal.PtrToStructure(
result_ptr,
result.GetType()
typeof(SDL.SDL_version)
);
return result;
}
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void TTF_ByteSwappedUNICODE(int swapped);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_Init();
/* IntPtr refers to a TTF_Font* */
[DllImport(nativeLibName)]
public static extern IntPtr TTF_OpenFont(
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)]
string file,
[DllImport(nativeLibName, EntryPoint = "TTF_OpenFont", CallingConvention = CallingConvention.Cdecl)]
private static extern unsafe IntPtr INTERNAL_TTF_OpenFont(
byte* file,
int ptsize
);
public static unsafe IntPtr TTF_OpenFont(string file, int ptsize)
{
byte* utf8File = SDL.Utf8EncodeHeap(file);
IntPtr handle = INTERNAL_TTF_OpenFont(
utf8File,
ptsize
);
Marshal.FreeHGlobal((IntPtr) utf8File);
return handle;
}
/* src refers to an SDL_RWops*, IntPtr to a TTF_Font* */
/* THIS IS A PUBLIC RWops FUNCTION! */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_OpenFontRW(
IntPtr src,
int freesrc,
int ptsize
);
/* IntPtr refers to a TTF_Font* */
[DllImport(nativeLibName)]
public static extern IntPtr TTF_OpenFontIndex(
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)]
string file,
[DllImport(nativeLibName, EntryPoint = "TTF_OpenFontIndex", CallingConvention = CallingConvention.Cdecl)]
private static extern unsafe IntPtr INTERNAL_TTF_OpenFontIndex(
byte* file,
int ptsize,
long index
);
public static unsafe IntPtr TTF_OpenFontIndex(
string file,
int ptsize,
long index
) {
byte* utf8File = SDL.Utf8EncodeHeap(file);
IntPtr handle = INTERNAL_TTF_OpenFontIndex(
utf8File,
ptsize,
index
);
Marshal.FreeHGlobal((IntPtr) utf8File);
return handle;
}
/* src refers to an SDL_RWops*, IntPtr to a TTF_Font* */
/* THIS IS A PUBLIC RWops FUNCTION! */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_OpenFontIndexRW(
IntPtr src,
int freesrc,
int ptsize,
long index
);
/* font refers to a TTF_Font*
* Only available in 2.0.16 or higher.
*/
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_SetFontSize(
IntPtr font,
int ptsize
);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_GetFontStyle(IntPtr font);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void TTF_SetFontStyle(IntPtr font, int style);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_GetFontOutline(IntPtr font);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void TTF_SetFontOutline(IntPtr font, int outline);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_GetFontHinting(IntPtr font);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void TTF_SetFontHinting(IntPtr font, int hinting);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_FontHeight(IntPtr font);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_FontAscent(IntPtr font);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_FontDescent(IntPtr font);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_FontLineSkip(IntPtr font);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_GetFontKerning(IntPtr font);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void TTF_SetFontKerning(IntPtr font, int allowed);
/* font refers to a TTF_Font*.
* IntPtr is actually a C long! This ignores Win64!
*/
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_FontFaces(IntPtr font);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
public static extern long TTF_FontFaces(IntPtr font);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_FontFaceIsFixedWidth(IntPtr font);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName, EntryPoint = "TTF_FontFaceFamilyName")]
[DllImport(nativeLibName, EntryPoint = "TTF_FontFaceFamilyName", CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_TTF_FontFaceFamilyName(
IntPtr font
);
public static string TTF_FontFaceFamily(IntPtr font)
public static string TTF_FontFaceFamilyName(IntPtr font)
{
return Marshal.PtrToStringAnsi(
return SDL.UTF8_ToManaged(
INTERNAL_TTF_FontFaceFamilyName(font)
);
}
/* font refers to a TTF_Font* */
[DllImport(nativeLibName, EntryPoint = "TTF_FontFaceStyleName")]
[DllImport(nativeLibName, EntryPoint = "TTF_FontFaceStyleName", CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_TTF_FontFaceStyleName(
IntPtr font
);
public static string TTF_FontFaceStyleName(IntPtr font)
{
return Marshal.PtrToStringAnsi(
return SDL.UTF8_ToManaged(
INTERNAL_TTF_FontFaceStyleName(font)
);
}
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_GlyphIsProvided(IntPtr font, ushort ch);
/* font refers to a TTF_Font*
* Only available in 2.0.16 or higher.
*/
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_GlyphIsProvided32(IntPtr font, uint ch);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_GlyphMetrics(
IntPtr font,
ushort ch,
ref int minx,
ref int maxx,
ref int miny,
ref int maxy,
ref int advance
out int minx,
out int maxx,
out int miny,
out int maxy,
out int advance
);
/* font refers to a TTF_Font*
* Only available in 2.0.16 or higher.
*/
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_GlyphMetrics32(
IntPtr font,
uint ch,
out int minx,
out int maxx,
out int miny,
out int maxy,
out int advance
);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_SizeText(
IntPtr font,
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)]
[In()] [MarshalAs(UnmanagedType.LPStr)]
string text,
ref int w,
ref int h
out int w,
out int h
);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
public static extern int TTF_SizeUTF8(
[DllImport(nativeLibName, EntryPoint = "TTF_SizeUTF8", CallingConvention = CallingConvention.Cdecl)]
public static extern unsafe int INTERNAL_TTF_SizeUTF8(
IntPtr font,
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)]
string text,
ref int w,
ref int h
byte* text,
out int w,
out int h
);
public static unsafe int TTF_SizeUTF8(
IntPtr font,
string text,
out int w,
out int h
) {
byte* utf8Text = SDL.Utf8EncodeHeap(text);
int result = INTERNAL_TTF_SizeUTF8(
font,
utf8Text,
out w,
out h
);
Marshal.FreeHGlobal((IntPtr) utf8Text);
return result;
}
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_SizeUNICODE(
IntPtr font,
ushort[] text,
ref int w,
ref int h
[In()] [MarshalAs(UnmanagedType.LPWStr)]
string text,
out int w,
out int h
);
/* font refers to a TTF_Font*
* Only available in 2.0.16 or higher.
*/
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_MeasureText(
IntPtr font,
[In()] [MarshalAs(UnmanagedType.LPStr)]
string text,
int measure_width,
out int extent,
out int count
);
/* font refers to a TTF_Font*
* Only available in 2.0.16 or higher.
*/
[DllImport(nativeLibName, EntryPoint = "TTF_MeasureUTF8", CallingConvention = CallingConvention.Cdecl)]
public static extern unsafe int INTERNAL_TTF_MeasureUTF8(
IntPtr font,
byte* text,
int measure_width,
out int extent,
out int count
);
public static unsafe int TTF_MeasureUTF8(
IntPtr font,
string text,
int measure_width,
out int extent,
out int count
) {
byte* utf8Text = SDL.Utf8EncodeHeap(text);
int result = INTERNAL_TTF_MeasureUTF8(
font,
utf8Text,
measure_width,
out extent,
out count
);
Marshal.FreeHGlobal((IntPtr) utf8Text);
return result;
}
/* font refers to a TTF_Font*
* Only available in 2.0.16 or higher.
*/
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_MeasureUNICODE(
IntPtr font,
[In()] [MarshalAs(UnmanagedType.LPWStr)]
string text,
int measure_width,
out int extent,
out int count
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderText_Solid(
IntPtr font,
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)]
[In()] [MarshalAs(UnmanagedType.LPStr)]
string text,
SDL.SDL_Color fg
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
public static extern IntPtr TTF_RenderUTF8_Solid(
[DllImport(nativeLibName, EntryPoint = "TTF_RenderUTF8_Solid", CallingConvention = CallingConvention.Cdecl)]
private static extern unsafe IntPtr INTERNAL_TTF_RenderUTF8_Solid(
IntPtr font,
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)]
string text,
byte* text,
SDL.SDL_Color fg
);
public static unsafe IntPtr TTF_RenderUTF8_Solid(
IntPtr font,
string text,
SDL.SDL_Color fg
) {
byte* utf8Text = SDL.Utf8EncodeHeap(text);
IntPtr result = INTERNAL_TTF_RenderUTF8_Solid(
font,
utf8Text,
fg
);
Marshal.FreeHGlobal((IntPtr) utf8Text);
return result;
}
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderUNICODE_Solid(
IntPtr font,
ushort[] text,
[In()] [MarshalAs(UnmanagedType.LPWStr)]
string text,
SDL.SDL_Color fg
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font*
* Only available in 2.0.16 or higher.
*/
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderText_Solid_Wrapped(
IntPtr font,
[In()] [MarshalAs(UnmanagedType.LPStr)]
string text,
SDL.SDL_Color fg,
uint wrapLength
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font*
* Only available in 2.0.16 or higher.
*/
[DllImport(nativeLibName, EntryPoint = "TTF_RenderUTF8_Solid_Wrapped", CallingConvention = CallingConvention.Cdecl)]
public static extern unsafe IntPtr INTERNAL_TTF_RenderUTF8_Solid_Wrapped(
IntPtr font,
byte* text,
SDL.SDL_Color fg,
uint wrapLength
);
public static unsafe IntPtr TTF_RenderUTF8_Solid_Wrapped(
IntPtr font,
string text,
SDL.SDL_Color fg,
uint wrapLength
) {
byte* utf8Text = SDL.Utf8EncodeHeap(text);
IntPtr result = INTERNAL_TTF_RenderUTF8_Solid_Wrapped(
font,
utf8Text,
fg,
wrapLength
);
Marshal.FreeHGlobal((IntPtr) utf8Text);
return result;
}
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font*
* Only available in 2.0.16 or higher.
*/
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderUNICODE_Solid_Wrapped(
IntPtr font,
[In()] [MarshalAs(UnmanagedType.LPWStr)]
string text,
SDL.SDL_Color fg,
uint wrapLength
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderGlyph_Solid(
IntPtr font,
ushort ch,
SDL.SDL_Color fg
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font*
* Only available in 2.0.16 or higher.
*/
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderGlyph32_Solid(
IntPtr font,
uint ch,
SDL.SDL_Color fg
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderText_Shaded(
IntPtr font,
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)]
[In()] [MarshalAs(UnmanagedType.LPStr)]
string text,
SDL.SDL_Color fg,
SDL.SDL_Color bg
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
public static extern IntPtr TTF_RenderUTF8_Shaded(
[DllImport(nativeLibName, EntryPoint = "TTF_RenderUTF8_Shaded", CallingConvention = CallingConvention.Cdecl)]
private static extern unsafe IntPtr INTERNAL_TTF_RenderUTF8_Shaded(
IntPtr font,
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)]
string text,
byte* text,
SDL.SDL_Color fg,
SDL.SDL_Color bg
);
public static unsafe IntPtr TTF_RenderUTF8_Shaded(
IntPtr font,
string text,
SDL.SDL_Color fg,
SDL.SDL_Color bg
) {
byte* utf8Text = SDL.Utf8EncodeHeap(text);
IntPtr result = INTERNAL_TTF_RenderUTF8_Shaded(
font,
utf8Text,
fg,
bg
);
Marshal.FreeHGlobal((IntPtr) utf8Text);
return result;
}
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderUNICODE_Shaded(
IntPtr font,
ushort[] text,
[In()] [MarshalAs(UnmanagedType.LPWStr)]
string text,
SDL.SDL_Color fg,
SDL.SDL_Color bg
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderText_Shaded_Wrapped(
IntPtr font,
[In()] [MarshalAs(UnmanagedType.LPStr)]
string text,
SDL.SDL_Color fg,
SDL.SDL_Color bg,
uint wrapLength
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font*
* Only available in 2.0.16 or higher.
*/
[DllImport(nativeLibName, EntryPoint = "TTF_RenderUTF8_Shaded_Wrapped", CallingConvention = CallingConvention.Cdecl)]
public static extern unsafe IntPtr INTERNAL_TTF_RenderUTF8_Shaded_Wrapped(
IntPtr font,
byte* text,
SDL.SDL_Color fg,
SDL.SDL_Color bg,
uint wrapLength
);
public static unsafe IntPtr TTF_RenderUTF8_Shaded_Wrapped(
IntPtr font,
string text,
SDL.SDL_Color fg,
SDL.SDL_Color bg,
uint wrapLength
) {
byte* utf8Text = SDL.Utf8EncodeHeap(text);
IntPtr result = INTERNAL_TTF_RenderUTF8_Shaded_Wrapped(
font,
utf8Text,
fg,
bg,
wrapLength
);
Marshal.FreeHGlobal((IntPtr) utf8Text);
return result;
}
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderUNICODE_Shaded_Wrapped(
IntPtr font,
[In()] [MarshalAs(UnmanagedType.LPWStr)]
string text,
SDL.SDL_Color fg,
SDL.SDL_Color bg,
uint wrapLength
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderGlyph_Shaded(
IntPtr font,
ushort ch,
SDL.SDL_Color fg,
SDL.SDL_Color bg
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font*
* Only available in 2.0.16 or higher.
*/
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderGlyph32_Shaded(
IntPtr font,
uint ch,
SDL.SDL_Color fg,
SDL.SDL_Color bg
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderText_Blended(
IntPtr font,
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)]
[In()] [MarshalAs(UnmanagedType.LPStr)]
string text,
SDL.SDL_Color fg
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
public static extern IntPtr TTF_RenderUTF8_Blended(
[DllImport(nativeLibName, EntryPoint = "TTF_RenderUTF8_Blended", CallingConvention = CallingConvention.Cdecl)]
private static extern unsafe IntPtr INTERNAL_TTF_RenderUTF8_Blended(
IntPtr font,
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)]
string text,
byte* text,
SDL.SDL_Color fg
);
public static unsafe IntPtr TTF_RenderUTF8_Blended(
IntPtr font,
string text,
SDL.SDL_Color fg
) {
byte* utf8Text = SDL.Utf8EncodeHeap(text);
IntPtr result = INTERNAL_TTF_RenderUTF8_Blended(
font,
utf8Text,
fg
);
Marshal.FreeHGlobal((IntPtr) utf8Text);
return result;
}
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderUNICODE_Blended(
IntPtr font,
ushort[] text,
[In()] [MarshalAs(UnmanagedType.LPWStr)]
string text,
SDL.SDL_Color fg
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderText_Blended_Wrapped(
IntPtr font,
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)]
[In()] [MarshalAs(UnmanagedType.LPStr)]
string text,
SDL.SDL_Color fg,
uint wrapped
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
public static extern IntPtr TTF_RenderUTF8_Blended_Wrapped(
[DllImport(nativeLibName, EntryPoint = "TTF_RenderUTF8_Blended_Wrapped", CallingConvention = CallingConvention.Cdecl)]
private static extern unsafe IntPtr INTERNAL_TTF_RenderUTF8_Blended_Wrapped(
IntPtr font,
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)]
string text,
byte* text,
SDL.SDL_Color fg,
uint wrapped
);
public static unsafe IntPtr TTF_RenderUTF8_Blended_Wrapped(
IntPtr font,
string text,
SDL.SDL_Color fg,
uint wrapped
) {
byte* utf8Text = SDL.Utf8EncodeHeap(text);
IntPtr result = INTERNAL_TTF_RenderUTF8_Blended_Wrapped(
font,
utf8Text,
fg,
wrapped
);
Marshal.FreeHGlobal((IntPtr) utf8Text);
return result;
}
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderUNICODE_Blended_Wrapped(
IntPtr font,
ushort[] text,
[In()] [MarshalAs(UnmanagedType.LPWStr)]
string text,
SDL.SDL_Color fg,
uint wrapped
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderGlyph_Blended(
IntPtr font,
ushort ch,
SDL.SDL_Color fg
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font*
* Only available in 2.0.16 or higher.
*/
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderGlyph32_Blended(
IntPtr font,
uint ch,
SDL.SDL_Color fg
);
/* Only available in 2.0.16 or higher. */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_SetDirection(int direction);
/* Only available in 2.0.16 or higher. */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_SetScript(int script);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void TTF_CloseFont(IntPtr font);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void TTF_Quit();
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_WasInit();
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_GetFontKerningSize(
IntPtr font,
int prev_index,
int index
);
/* font refers to a TTF_Font*
* Only available in 2.0.15 or higher.
*/
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_GetFontKerningSizeGlyphs(
IntPtr font,
ushort previous_ch,
ushort ch
);
/* font refers to a TTF_Font*
* Only available in 2.0.16 or higher.
*/
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_GetFontKerningSizeGlyphs32(
IntPtr font,
ushort previous_ch,
ushort ch
);
public static string TTF_GetError()
{
return SDL.SDL_GetError();
}
public static void TTF_SetError(string fmtAndArglist)
{
SDL.SDL_SetError(fmtAndArglist);
}
#endregion
}
}
}