Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.

Commit 7127c8d

Browse files
committed
project: Add WinRT support.
1 parent f045788 commit 7127c8d

6 files changed

Lines changed: 873 additions & 10 deletions

File tree

SMP/SMP.patch

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
diff --git a/msvc/contrib/dlfcn.c b/msvc/contrib/dlfcn.c
2-
index 01b5781..2ba939e 100644
2+
index 01b5781..30d56d3 100644
33
--- a/msvc/contrib/dlfcn.c
44
+++ b/msvc/contrib/dlfcn.c
5-
@@ -37,11 +37,11 @@ void *dlopen(const char *module_name, int mode)
5+
@@ -36,15 +36,21 @@ void *dlopen(const char *module_name, int mode)
6+
* same path or can be found in the usual places. Failing that, let's
67
* let that dso look in the apache root.
78
*/
9+
+#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY != WINAPI_FAMILY_APP)
810
em = SetErrorMode(SEM_FAILCRITICALERRORS);
911
- dsoh = LoadLibraryEx(path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
1012
+ dsoh = LoadLibraryExA(path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
@@ -16,8 +18,16 @@ index 01b5781..2ba939e 100644
1618
}
1719
SetErrorMode(em);
1820
SetLastError(0); // clear the last error
21+
+#else
22+
+ wchar_t pathW[MAX_PATH];
23+
+ mbstowcs(pathW, path, MAX_PATH);
24+
+ dsoh = LoadPackagedLibrary(pathW, 0);
25+
+#endif
26+
return (void *)dsoh;
27+
}
28+
1929
diff --git a/src/dvd_input.c b/src/dvd_input.c
20-
index b4b11ae..1ec0c63 100644
30+
index d7dad87..14d54d3 100644
2131
--- a/src/dvd_input.c
2232
+++ b/src/dvd_input.c
2333
@@ -23,7 +23,11 @@
@@ -34,30 +44,31 @@ index b4b11ae..1ec0c63 100644
3444
#include <errno.h>
3545

3646
diff --git a/src/dvd_reader.c b/src/dvd_reader.c
37-
index 5e97893..3b35ebe 100644
47+
index c4d9641..b222482 100644
3848
--- a/src/dvd_reader.c
3949
+++ b/src/dvd_reader.c
4050
@@ -29,7 +29,9 @@
4151
#include <stdio.h> /* fprintf */
4252
#include <errno.h> /* errno, EIN* */
4353
#include <string.h> /* memcpy, strlen */
44-
+#ifdef HAVE_UNISTD_H
45-
#include <unistd.h> /* chdir, getcwd */
54+
+#if HAVE_UNISTD_H
55+
#include <unistd.h> /* pclose */
4656
+#endif
4757
#include <limits.h> /* PATH_MAX */
4858
#include <dirent.h> /* opendir, readdir */
4959
#include <ctype.h> /* isalpha */
50-
@@ -61,6 +63,8 @@
60+
@@ -61,6 +63,9 @@
5161
#if defined(_WIN32)
5262
# include <windows.h>
5363
# include "msvc/contrib/win32_cs.h"
64+
+# include <winsock2.h>
5465
+# define strcasecmp _stricmp
5566
+# define strncasecmp _strnicmp
5667
#endif
5768

5869
/* misc win32 helpers */
5970
diff --git a/src/dvd_udf.c b/src/dvd_udf.c
60-
index 41517fa..45f682e 100644
71+
index 4d90ba4..ccd0a86 100644
6172
--- a/src/dvd_udf.c
6273
+++ b/src/dvd_udf.c
6374
@@ -32,17 +32,25 @@
@@ -87,7 +98,7 @@ index 41517fa..45f682e 100644
8798
static int DVDReadLBUDF( dvd_reader_t *ctx, uint32_t lb_number,
8899
size_t block_count, unsigned char *data,
89100
diff --git a/src/dvdread/dvd_reader.h b/src/dvdread/dvd_reader.h
90-
index 208259b..00a20a0 100644
101+
index 5681e0e..2fd75b3 100644
91102
--- a/src/dvdread/dvd_reader.h
92103
+++ b/src/dvdread/dvd_reader.h
93104
@@ -28,6 +28,8 @@

SMP/libdvdread.sln

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,26 @@ VisualStudioVersion = 12.0.30501.0
44
MinimumVisualStudioVersion = 12.0.30501.0
55
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdvdread", "libdvdread.vcxproj", "{66351D03-374D-4A28-B5DF-3BEBEE3430D2}"
66
EndProject
7+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdvdread_winrt", "libdvdread_winrt.vcxproj", "{A6351D03-374D-4A28-B5DF-3BEBEE3430D2}"
8+
EndProject
79
Global
810
GlobalSection(SolutionConfigurationPlatforms) = preSolution
911
Debug|x64 = Debug|x64
1012
Debug|x86 = Debug|x86
1113
DebugDLL|x64 = DebugDLL|x64
1214
DebugDLL|x86 = DebugDLL|x86
15+
DebugDLLWinRT|x64 = DebugDLLWinRT|x64
16+
DebugDLLWinRT|x86 = DebugDLLWinRT|x86
17+
DebugWinRT|x64 = DebugWinRT|x64
18+
DebugWinRT|x86 = DebugWinRT|x86
1319
Release|x64 = Release|x64
1420
Release|x86 = Release|x86
1521
ReleaseDLL|x64 = ReleaseDLL|x64
1622
ReleaseDLL|x86 = ReleaseDLL|x86
23+
ReleaseDLLWinRT|x64 = ReleaseDLLWinRT|x64
24+
ReleaseDLLWinRT|x86 = ReleaseDLLWinRT|x86
25+
ReleaseWinRT|x64 = ReleaseWinRT|x64
26+
ReleaseWinRT|x86 = ReleaseWinRT|x86
1727
EndGlobalSection
1828
GlobalSection(ProjectConfigurationPlatforms) = postSolution
1929
{66351D03-374D-4A28-B5DF-3BEBEE3430D2}.Debug|x64.ActiveCfg = Debug|x64
@@ -24,6 +34,10 @@ Global
2434
{66351D03-374D-4A28-B5DF-3BEBEE3430D2}.DebugDLL|x64.Build.0 = DebugDLL|x64
2535
{66351D03-374D-4A28-B5DF-3BEBEE3430D2}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
2636
{66351D03-374D-4A28-B5DF-3BEBEE3430D2}.DebugDLL|x86.Build.0 = DebugDLL|Win32
37+
{66351D03-374D-4A28-B5DF-3BEBEE3430D2}.DebugDLLWinRT|x64.ActiveCfg = DebugDLL|x64
38+
{66351D03-374D-4A28-B5DF-3BEBEE3430D2}.DebugDLLWinRT|x86.ActiveCfg = DebugDLL|Win32
39+
{66351D03-374D-4A28-B5DF-3BEBEE3430D2}.DebugWinRT|x64.ActiveCfg = Debug|x64
40+
{66351D03-374D-4A28-B5DF-3BEBEE3430D2}.DebugWinRT|x86.ActiveCfg = Debug|Win32
2741
{66351D03-374D-4A28-B5DF-3BEBEE3430D2}.Release|x64.ActiveCfg = Release|x64
2842
{66351D03-374D-4A28-B5DF-3BEBEE3430D2}.Release|x64.Build.0 = Release|x64
2943
{66351D03-374D-4A28-B5DF-3BEBEE3430D2}.Release|x86.ActiveCfg = Release|Win32
@@ -32,8 +46,39 @@ Global
3246
{66351D03-374D-4A28-B5DF-3BEBEE3430D2}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
3347
{66351D03-374D-4A28-B5DF-3BEBEE3430D2}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
3448
{66351D03-374D-4A28-B5DF-3BEBEE3430D2}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
49+
{66351D03-374D-4A28-B5DF-3BEBEE3430D2}.ReleaseDLLWinRT|x64.ActiveCfg = ReleaseDLL|x64
50+
{66351D03-374D-4A28-B5DF-3BEBEE3430D2}.ReleaseDLLWinRT|x86.ActiveCfg = ReleaseDLL|Win32
51+
{66351D03-374D-4A28-B5DF-3BEBEE3430D2}.ReleaseWinRT|x64.ActiveCfg = Release|x64
52+
{66351D03-374D-4A28-B5DF-3BEBEE3430D2}.ReleaseWinRT|x86.ActiveCfg = Release|Win32
53+
{A6351D03-374D-4A28-B5DF-3BEBEE3430D2}.Debug|x64.ActiveCfg = DebugWinRT|x64
54+
{A6351D03-374D-4A28-B5DF-3BEBEE3430D2}.Debug|x86.ActiveCfg = DebugWinRT|Win32
55+
{A6351D03-374D-4A28-B5DF-3BEBEE3430D2}.DebugDLL|x64.ActiveCfg = DebugDLLWinRT|x64
56+
{A6351D03-374D-4A28-B5DF-3BEBEE3430D2}.DebugDLL|x86.ActiveCfg = DebugDLLWinRT|Win32
57+
{A6351D03-374D-4A28-B5DF-3BEBEE3430D2}.DebugDLLWinRT|x64.ActiveCfg = DebugDLLWinRT|x64
58+
{A6351D03-374D-4A28-B5DF-3BEBEE3430D2}.DebugDLLWinRT|x64.Build.0 = DebugDLLWinRT|x64
59+
{A6351D03-374D-4A28-B5DF-3BEBEE3430D2}.DebugDLLWinRT|x86.ActiveCfg = DebugDLLWinRT|Win32
60+
{A6351D03-374D-4A28-B5DF-3BEBEE3430D2}.DebugDLLWinRT|x86.Build.0 = DebugDLLWinRT|Win32
61+
{A6351D03-374D-4A28-B5DF-3BEBEE3430D2}.DebugWinRT|x64.ActiveCfg = DebugWinRT|x64
62+
{A6351D03-374D-4A28-B5DF-3BEBEE3430D2}.DebugWinRT|x64.Build.0 = DebugWinRT|x64
63+
{A6351D03-374D-4A28-B5DF-3BEBEE3430D2}.DebugWinRT|x86.ActiveCfg = DebugWinRT|Win32
64+
{A6351D03-374D-4A28-B5DF-3BEBEE3430D2}.DebugWinRT|x86.Build.0 = DebugWinRT|Win32
65+
{A6351D03-374D-4A28-B5DF-3BEBEE3430D2}.Release|x64.ActiveCfg = ReleaseWinRT|x64
66+
{A6351D03-374D-4A28-B5DF-3BEBEE3430D2}.Release|x86.ActiveCfg = ReleaseWinRT|Win32
67+
{A6351D03-374D-4A28-B5DF-3BEBEE3430D2}.ReleaseDLL|x64.ActiveCfg = ReleaseDLLWinRT|x64
68+
{A6351D03-374D-4A28-B5DF-3BEBEE3430D2}.ReleaseDLL|x86.ActiveCfg = ReleaseDLLWinRT|Win32
69+
{A6351D03-374D-4A28-B5DF-3BEBEE3430D2}.ReleaseDLLWinRT|x64.ActiveCfg = ReleaseDLLWinRT|x64
70+
{A6351D03-374D-4A28-B5DF-3BEBEE3430D2}.ReleaseDLLWinRT|x64.Build.0 = ReleaseDLLWinRT|x64
71+
{A6351D03-374D-4A28-B5DF-3BEBEE3430D2}.ReleaseDLLWinRT|x86.ActiveCfg = ReleaseDLLWinRT|Win32
72+
{A6351D03-374D-4A28-B5DF-3BEBEE3430D2}.ReleaseDLLWinRT|x86.Build.0 = ReleaseDLLWinRT|Win32
73+
{A6351D03-374D-4A28-B5DF-3BEBEE3430D2}.ReleaseWinRT|x64.ActiveCfg = ReleaseWinRT|x64
74+
{A6351D03-374D-4A28-B5DF-3BEBEE3430D2}.ReleaseWinRT|x64.Build.0 = ReleaseWinRT|x64
75+
{A6351D03-374D-4A28-B5DF-3BEBEE3430D2}.ReleaseWinRT|x86.ActiveCfg = ReleaseWinRT|Win32
76+
{A6351D03-374D-4A28-B5DF-3BEBEE3430D2}.ReleaseWinRT|x86.Build.0 = ReleaseWinRT|Win32
3577
EndGlobalSection
3678
GlobalSection(SolutionProperties) = preSolution
3779
HideSolutionNode = FALSE
3880
EndGlobalSection
81+
GlobalSection(ExtensibilityGlobals) = postSolution
82+
SolutionGuid = {03965265-CAE7-45FE-8A40-4CDCB53517DA}
83+
EndGlobalSection
3984
EndGlobal

0 commit comments

Comments
 (0)