Skip to content

Commit

Permalink
fix conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
inada-s committed Jan 1, 2025
1 parent d5a4622 commit bb0f205
Showing 1 changed file with 0 additions and 79 deletions.
79 changes: 0 additions & 79 deletions shell/apple/emulator-osx/emulator-osx/osx-main.mm
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,9 @@ int darw_printf(const char* text, ...)
va_end(args);

NSString* log = [NSString stringWithCString:temp encoding: NSUTF8StringEncoding];
<<<<<<< HEAD
static bool isXcode = [[[NSProcessInfo processInfo] environment][@"OS_ACTIVITY_DT_MODE"] boolValue];
=======
NSDictionary<NSString *, NSString *>* env = [[NSProcessInfo processInfo] environment];
static bool isXcode = [env[@"OS_ACTIVITY_DT_MODE"] boolValue] || [env[@"COMMAND_MODE"] isEqualToString:@"unix2003"] || [env[@"TERM"] isEqualToString:@"dumb"];

>>>>>>> upstream/master
if (isXcode) // Xcode console does not support colors
{
log = [log stringByReplacingOccurrencesOfString:@"\x1b[0m" withString:@""];
Expand All @@ -56,58 +52,12 @@ int darw_printf(const char* text, ...)
}

void os_DoEvents() {
<<<<<<< HEAD
#if defined(USE_SDL)
NSMenuItem *editMenuItem = [[NSApp mainMenu] itemAtIndex:1];
[editMenuItem setEnabled:SDL_IsTextInputActive()];
#endif
}

void UpdateInputState() {
=======
>>>>>>> upstream/master
#if defined(USE_SDL)
NSMenuItem *editMenuItem = [[NSApp mainMenu] itemAtIndex:1];
[editMenuItem setEnabled:SDL_IsTextInputActive()];
#endif
}

<<<<<<< HEAD
void os_CreateWindow() {
#ifdef DEBUG
int ret = task_set_exception_ports(
mach_task_self(),
EXC_MASK_BAD_ACCESS,
MACH_PORT_NULL,
EXCEPTION_DEFAULT,
0);

if (ret != KERN_SUCCESS) {
printf("task_set_exception_ports: %s\n", mach_error_string(ret));
}
#endif
//For settings.dreamcast.ContentPath.emplace_back("./"), Since macOS app bundle cwd is at "/"
chdir([[[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent] cStringUsingEncoding:NSUTF8StringEncoding]);
sdl_window_create();
}

void os_SetupInput()
{
#if defined(USE_SDL)
input_sdl_init();
#endif
}

void os_TermInput()
{
#if defined(USE_SDL)
input_sdl_quit();
#endif
}

void common_linux_setup();
=======
>>>>>>> upstream/master
static int emu_flycast_init();

static void emu_flycast_term()
Expand Down Expand Up @@ -342,24 +292,13 @@ void os_RunInstance(int argc, const char *argv[])
static SyphonOpenGLServer* syphonGLServer;
static SyphonMetalServer* syphonMtlServer;

<<<<<<< HEAD
void os_VideoRoutingInitSyphonWithGLContext(void* glContext)
{
int boardID = cfgLoadInt("naomi", "BoardId", 0);
syphonGLServer = [[SyphonOpenGLServer alloc] initWithName:[NSString stringWithFormat:(boardID == 0 ? @"Video Content" : @"Video Content - %d"), boardID] context:[(__bridge NSOpenGLContext*)glContext CGLContextObj] options:nil];
}

void os_VideoRoutingPublishFrameTexture(GLuint texID, GLuint texTarget, float w, float h)
{
=======
void os_VideoRoutingPublishFrameTexture(GLuint texID, GLuint texTarget, float w, float h)
{
if (syphonGLServer == NULL)
{
int boardID = cfgLoadInt("naomi", "BoardId", 0);
syphonGLServer = [[SyphonOpenGLServer alloc] initWithName:[NSString stringWithFormat:(boardID == 0 ? @"Video Content" : @"Video Content - %d"), boardID] context:[SDL_GL_GetCurrentContext() CGLContextObj] options:nil];
}
>>>>>>> upstream/master
CGLLockContext([syphonGLServer context]);
[syphonGLServer publishFrameTexture:texID textureTarget:texTarget imageRegion:NSMakeRect(0, 0, w, h) textureDimensions:NSMakeSize(w, h) flipped:NO];
CGLUnlockContext([syphonGLServer context]);
Expand All @@ -372,20 +311,6 @@ void os_VideoRoutingTermGL()
syphonGLServer = NULL;
}

<<<<<<< HEAD
void os_VideoRoutingInitSyphonWithVkDevice(const vk::UniqueDevice& device)
{
vk::ExportMetalDeviceInfoEXT deviceInfo;
auto objectsInfo = vk::ExportMetalObjectsInfoEXT(&deviceInfo);
device->exportMetalObjectsEXT(&objectsInfo);

int boardID = cfgLoadInt("naomi", "BoardId", 0);
syphonMtlServer = [[SyphonMetalServer alloc] initWithName:[NSString stringWithFormat:(boardID == 0 ? @"Video Content" : @"Video Content - %d"), boardID] device:deviceInfo.mtlDevice options:nil];
}

void os_VideoRoutingPublishFrameTexture(const vk::Device& device, const vk::Image& image, const vk::Queue& queue, float x, float y, float w, float h)
{
=======
void os_VideoRoutingPublishFrameTexture(const vk::Device& device, const vk::Image& image, const vk::Queue& queue, float x, float y, float w, float h)
{
if (syphonMtlServer == NULL)
Expand All @@ -398,7 +323,6 @@ void os_VideoRoutingPublishFrameTexture(const vk::Device& device, const vk::Imag
syphonMtlServer = [[SyphonMetalServer alloc] initWithName:[NSString stringWithFormat:(boardID == 0 ? @"Video Content" : @"Video Content - %d"), boardID] device:deviceInfo.mtlDevice options:nil];
}

>>>>>>> upstream/master
auto textureInfo = vk::ExportMetalTextureInfoEXT(image);
auto commandInfo = vk::ExportMetalCommandQueueInfoEXT(queue);
commandInfo.pNext = &textureInfo;
Expand All @@ -416,8 +340,6 @@ void os_VideoRoutingTermVk()
[syphonMtlServer release];
syphonMtlServer = NULL;
}
<<<<<<< HEAD
=======

namespace hostfs
{
Expand All @@ -429,4 +351,3 @@ void os_VideoRoutingTermVk()
}

}
>>>>>>> upstream/master

0 comments on commit bb0f205

Please sign in to comment.