提交 8c19ad4b 编写于 作者: P Palana

updated obs platform files

上级 3d88a435
......@@ -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) */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册