Commit Graph

2104 Commits (fb414e8988d6735152a87f766a237f291594f3f8)

Author SHA1 Message Date
jp9000 fb414e8988 win/test: Fix string format specifier
bnum_allocs returns a long (%ld), not an unsigned long long (%llu).
2015-02-09 03:56:14 -08:00
jp9000 4ba293a6d9 text-freetype2: Fix wrong parameter type
These functions expect char*, where as the string is stored as a
unsigned char* (FT_Byte*).
2015-02-09 03:56:13 -08:00
jp9000 3812393472 libobs-d3d11: Fix uint -> HWND casting
HWND is considered a pointer, so when casting you must cast to a
pointer-sized integer before attempting to cast to a pointer.
2015-02-09 03:56:12 -08:00
jp9000 86563ea1cd libobs-d3d11: Fix vertical alignment
Someone's going to yell at me about this, but fix vertical alignment for
certain member variables in the main header.

For future reference, if you must use vertical alignment, always give it
plenty of space for the type names to grow in case you need to
add/change variables in the future; don't just align to the 'longest'
value, give it an extra 8-16 spaces for potential future variables.
This is done to prevent having to make commits like this in the future
that sort of pollute the history.
2015-02-09 03:56:12 -08:00
jp9000 3af33b26ac libobs-d3d11: Use integer type with switch
DXGI_FORMAT has too many values we don't need/use, so the value for this
switch should be an integer instead of an enum to prevent warnings.
2015-02-09 03:56:11 -08:00
jp9000 e7cca4edd1 libobs-d3d11: Fix incorrect format specifier 2015-02-09 03:56:10 -08:00
jp9000 73c6dca1b5 libobs-d3d11: Fix potentially uninitialized vars 2015-02-09 03:56:10 -08:00
jp9000 7650df5525 libobs-d3d11: Fill out switch enum values
When using an enumeration value with a switch, it needs to be filled out
with all possible values to prevent compiler warnings.  This warning is
used to prevent the developer from unintentionally forgetting to add new
enum values to any switches the enum is used on later on.  Sadly, only
good compilers actually have this warning (mingw).
2015-02-09 03:56:09 -08:00
jp9000 1b2c3a6176 libobs-d3d11: Fix initializer list ordering
Microsoft's compiler doesn't seem to care about warning about things
like initializer list ordering.  Mingw actually reports on this to
prevent potential confusion about ordering.
2015-02-09 03:56:09 -08:00
jp9000 f4406e71f4 libobs-d3d11: Use member initialization
Instead of using initializer lists, use member initialization to clean
up the default values for member variables
2015-02-09 03:56:08 -08:00
jp9000 8943ccc1d6 win-dshow: Use member initialization
Instead of using initializer list to set variables to null/false, use
C++11 member initialization
2015-02-09 03:56:07 -08:00
jp9000 02065f10af win-dshow: Remove deprecated FFmpeg functions 2015-02-09 03:56:07 -08:00
jp9000 731930af50 win-capture: Fix parameter type warning
Parameter expects uint8_t*, was using char*, so just cast to fix it.
2015-02-09 03:56:06 -08:00
jp9000 883d93e84c win-dshow: Remove unnecessarily inline define
This is already defined when including libobs headers
2015-02-09 03:55:31 -08:00
jp9000 372a23de68 win-capture: Use inline define with VC only
mingw already supports the regular inline keyword in C; VC does not.
2015-02-09 03:55:17 -08:00
jp9000 12a000cae5 win-capture: Refactor inline functions
Apparently someone dumb (aka me) neglected to properly handle the inline
graphics hook API functions.  You're not supposed to 'extern' inline
functions, they need to be defined for each file when ever they're used.
2015-02-09 03:51:08 -08:00
jp9000 91b33908d9 win-capture: Remove unused static variables 2015-02-09 03:50:50 -08:00
jp9000 fce3cf6bdb win-capture: static keyword comes before const 2015-02-09 03:49:48 -08:00
jp9000 f8c7df2616 win-capture: Fix bug initializing via d3d9 swap
Apparently neglected to use the reference operator.  I think this may
partially be one of the reasons why many developers still choose to use
pointers instead of references, but fortunately an actual GOOD compiler
warns about this (aka anything but vc)
2015-02-09 03:49:47 -08:00
jp9000 fbf881ecdd win-capture: Fix enum switch warnings
The enum switch warning is used to signify when you are missing
enum values.
2015-02-09 03:49:46 -08:00
jp9000 253989bd72 win-capture: Mark unused parameters 2015-02-09 03:49:45 -08:00
jp9000 04c54162b2 win-capture: Fix ptr -> int cast warnings (mingw) 2015-02-09 03:49:44 -08:00
jp9000 2301a6f578 win-capture: Clarify if statement via inline func
Clears up a warning (to prevent && and || confusion), and clarifies what
specifically the if statement is trying to accomplish (check to see if
the capture is valid)
2015-02-09 03:49:43 -08:00
jp9000 e2ee8adf77 win-capture: Fix potentially uninitialized vars 2015-02-09 03:49:20 -08:00
jp9000 aa3bdd9845 win-capture: Fix incorrect parameter type warning
Was using const char** when the parameter expects const uint8_t**
2015-02-09 03:49:19 -08:00
jp9000 6b38fa35b0 Use _MSC_VER for MSVC-specific pragmas
These aren't used on mingw so they need to be surrounded by #ifdef
_MSC_VER
2015-02-09 03:49:18 -08:00
jp9000 73d3be9311 obs-outputs: Use INVALID_SOCKET instead of -1
On windows, for whatever reason sockets use the SOCKET type which is not
a signed integer.  Still, even though it's not a signed integer, -1 is
used to indicate an invalid socket, but the way you use it is via
microsoft's fabulously dumb little INVALID_SOCKET define, so we have to
make librtmp use that instead.
2015-02-09 03:49:17 -08:00
jp9000 e26dec916e libobs: Use windows wide <-> UTF8 conversion
If on windows, use the windows UTF conversion functions due to the fact
that the existing utf code is meant for 32bit wide characters, while the
windows conversion functions will properly handle 16bit wide characters.
2015-02-09 03:49:16 -08:00
jp9000 0c30dca526 libobs: Update to latest version of ComPtr.hpp 2015-02-09 03:49:15 -08:00
jp9000 5dfecab15c Fix windows printf format warnings (from mingw) 2015-02-09 03:49:14 -08:00
jp9000 0c1d121ff2 Remove various unused variables
Unused variables detected by mingw
2015-02-09 03:49:13 -08:00
jp9000 f9d4a957c1 Disable -Wmissing-braces
This warning is somewhat insignificant for most of what we do; just
warns about missing braces for sub-structures, but most of the time it
wrongly triggers on = {0}, which is a standard way of initializing a
structure to 0 in C.
2015-02-09 03:48:25 -08:00
martell a83e74dc1c Disable SEH for mingw-w64
The SEH implementation is not quite working properly in mingw-w64, so
disable it for the time being.
2015-02-09 03:47:27 -08:00
martell 5d184dc8e5 obs-d3d11: use sprintf for mingw-w64
We have a sprintf_s function in mingw-w64, but it's the it won't compile
with visual studio because it's the C11 specification (aka the correct
specification that's not made by morons).  Microsoft's version differs
to the specification (and is made by morons), so fall back to sprintf

(note if you can't tell, this commit message was edited by Jim)
2015-02-09 03:46:11 -08:00
martell d1a1a84722 obs-d3d11: Use cinttypes header (mingw)
There appears to be a bug with mingw where including the regular C
inttypes.h won't work; instead you have to use the 'cinttypes' C++
version.
2015-02-09 03:43:56 -08:00
martell e96bd8c6bb obs-d3d11: include float.h for FLT_MAX
gcc expects this header to be included
2015-02-09 03:41:59 -08:00
martell c0827212df UI: use _WIN32 instead of WIN32
_WIN32 is a compiler define so it should be used.  WIN32 is only valid
when it's defined in a header.
2015-02-09 03:41:58 -08:00
martell e0fab8888f test-input: avoid w32-pthreads for mingw-w64 2015-02-09 03:41:57 -08:00
martell 97cc9b610a win-capture: on mingw-w64 support try and catch 2015-02-09 03:41:56 -08:00
martell c5478f52d9 win-capture: explicitly cast function pointers
This solves invalid conversions when building with gcc
2015-02-09 03:41:55 -08:00
martell 1e056fd7ec win-capture: deal with a 32bit handle cast errors
The HWND type is a void pointer, but HWND values are global and always
32bit despite, so casting to 32bit can cause cast warnings on actual
good compilers like gcc via mingw.  This change correctly handles the
casting to 32bits without producing unwanted warnings or errors on
mingw.
2015-02-09 03:41:54 -08:00
martell c5fa22ae93 win-capture: avoid multiple definitions of data
At link time unless they are defined static they will conflict
2015-02-09 03:41:54 -08:00
martell 45cec546bd win-capture: fix link libs for mingw-w64
win-capture should not postfix .lib to psapi.

The graphics hook also requires psapi when linking.

Also change some link libs as mingw-w64 libraries are not postfixed
.lib.
2015-02-09 03:41:53 -08:00
martell d161f92105 obs-output: avoid w32-pthreads for mingw-w64
mingw-w64 provides its own pthreads library.

Also, change link libs as mingw-w64 libraries are not postfixed .lib
2015-02-09 03:41:52 -08:00
martell b8055ed944 obs-ffmpeg: avoid w32-pthreads for mingw-w64
mingw-w64 provides its own pthreads library
2015-02-09 03:41:51 -08:00
martell 27c4336eed libobs-d3d11: Remove Microsoft's dxgi.h
I have added LGPL idl's for d3d11 and dxgi to mingw-w64, so we can
remove the existing mingw helper files from libobs-d3d11
2015-02-09 03:41:50 -08:00
martell f9fa9c289f libobs: fix warning when logging the win version
The OSVERSIONINFOW structure contains DWORD variables, so to keep mingw
happy this should be printed with %ld
2015-02-09 03:41:49 -08:00
martell 9dd542f4fb libobs: fix warning when logging the cpu speed
Speed is a DWORD and should be printed as %ld.  This will keep mingw
happy and warning free
2015-02-09 03:41:49 -08:00
martell ef37b9b888 libobs: fix windows version log warning
OSVERSIONINFOW uses SIZE_T so cast to unsigned long instead.
2015-02-09 03:41:48 -08:00
martell 119c06198a deps-glad: don't build with -fPIC on windows
-fPIC generates unwanted warnings in mingw on windows.
2015-02-09 03:41:47 -08:00