Skip to content
Snippets Groups Projects
Commit 8c19ad4b authored by Palana's avatar Palana
Browse files

updated obs platform files

parent 3d88a435
No related branches found
No related tags found
No related merge requests found
......@@ -34,7 +34,7 @@ if(WIN32)
platform-windows.cpp)
elseif(APPLE)
set(obs_platform_src
platform-osx.cpp)
platform-osx.mm)
elseif(UNIX)
set(obs_platform_src
platform-nix.cpp)
......
......@@ -26,7 +26,7 @@ obs_SOURCES += platform-windows.cpp
endif
if OS_OSX
obs_SOURCES += platform-osx.cpp
obs_SOURCES += platform-osx.mm
endif
if OS_NIX
......
......@@ -20,6 +20,8 @@
#include <unistd.h>
#import <AppKit/AppKit.h>
bool GetDataFilePath(const char *data, string &output)
{
stringstream str;
......@@ -31,5 +33,10 @@ bool GetDataFilePath(const char *data, string &output)
void GetMonitors(vector<MonitorInfo> &monitors)
{
monitors.clear();
// TODO
for(NSScreen *screen : [NSScreen screens])
{
NSRect frame = [screen convertRectToBacking:[screen frame]];
monitors.emplace_back(frame.origin.x, frame.origin.y,
frame.size.width, frame.size.height);
}
}
......@@ -26,6 +26,9 @@ using namespace std;
struct MonitorInfo {
int32_t x, y;
uint32_t cx, cy;
MonitorInfo(int32_t x, int32_t y, uint32_t cx, uint32_t cy)
: x(x), y(y), cx(cx), cy(cy)
{}
};
/* Gets the path of obs-studio specific data files (such as locale) */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment