Skip to content

Commit

Permalink
Re-format sources
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Jan 12, 2024
1 parent bc786d2 commit d46ff88
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ void kinc_g4_internal_init(void) {
if (result == E_FAIL || result == DXGI_ERROR_SDK_COMPONENT_MISSING) {
kinc_log(KINC_LOG_LEVEL_WARNING, "%s", "Failed to create device with D3D11_CREATE_DEVICE_DEBUG, trying without");
flags &= ~D3D11_CREATE_DEVICE_DEBUG;
result = D3D11CreateDevice(adapter, D3D_DRIVER_TYPE_HARDWARE, NULL, flags, featureLevels, ARRAYSIZE(featureLevels), D3D11_SDK_VERSION,
&dx_ctx.device, &featureLevel, &dx_ctx.context);
result = D3D11CreateDevice(adapter, D3D_DRIVER_TYPE_HARDWARE, NULL, flags, featureLevels, ARRAYSIZE(featureLevels), D3D11_SDK_VERSION, &dx_ctx.device,
&featureLevel, &dx_ctx.context);
}
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ void kinc_g5_shader_init(kinc_g5_shader_t *shader, const void *source, size_t le
#ifdef KINC_KONG
strcpy(shader->impl.name, (const char *)source);
shader->impl.mtlFunction = (__bridge_retained void *)[getMetalLibrary() newFunctionWithName:[NSString stringWithCString:shader->impl.name
encoding:NSUTF8StringEncoding]];
encoding:NSUTF8StringEncoding]];
#else
shader->impl.name[0] = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -822,21 +822,15 @@ void kinc_g5_command_list_execute(kinc_g5_command_list_t *list) {
submit_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
submit_info.pNext = NULL;

VkSemaphore semaphores[2] = {
framebuffer_available,
relay_semaphore
};
VkPipelineStageFlags dst_stage_flags[2] = {
VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT,
VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT
};
VkSemaphore semaphores[2] = {framebuffer_available, relay_semaphore};
VkPipelineStageFlags dst_stage_flags[2] = {VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT};
if (wait_for_framebuffer) {
submit_info.pWaitSemaphores = semaphores;
submit_info.pWaitDstStageMask = dst_stage_flags;
submit_info.waitSemaphoreCount = wait_for_relay ? 2 : 1;
wait_for_framebuffer = false;
}
else if(wait_for_relay) {
else if (wait_for_relay) {
submit_info.waitSemaphoreCount = 1;
submit_info.pWaitSemaphores = &semaphores[1];
submit_info.pWaitDstStageMask = &dst_stage_flags[1];
Expand Down
6 changes: 3 additions & 3 deletions Backends/System/Android/Sources/kinc/backend/system.c.h
Original file line number Diff line number Diff line change
Expand Up @@ -897,9 +897,9 @@ void KincAndroidKeyboardInit() {
int methodTableSize = sizeof(methodTable) / sizeof(methodTable[0]);

int failure = (*env)->RegisterNatives(env, clazz, methodTable, methodTableSize);
if (failure != 0) {
kinc_log(KINC_LOG_LEVEL_WARNING, "Failed to register KincActivity.nativeKincKeyPress");
}
if (failure != 0) {
kinc_log(KINC_LOG_LEVEL_WARNING, "Failed to register KincActivity.nativeKincKeyPress");
}

(*activity->vm)->DetachCurrentThread(activity->vm);
}
Expand Down
3 changes: 1 addition & 2 deletions Backends/System/Android/Sources/kinc/backend/video.c.h
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,7 @@ void KoreAndroidVideoInit() {
jclass clazz = kinc_android_find_class(env, "tech.kinc.KincMoviePlayer");

// String path, Surface surface, int id
JNINativeMethod methodTable[] = {
{"nativeCreate", "(Ljava/lang/String;Landroid/view/Surface;I)V", (void *)Java_tech_kinc_KincMoviePlayer_nativeCreate}};
JNINativeMethod methodTable[] = {{"nativeCreate", "(Ljava/lang/String;Landroid/view/Surface;I)V", (void *)Java_tech_kinc_KincMoviePlayer_nativeCreate}};

int methodTableSize = sizeof(methodTable) / sizeof(methodTable[0]);

Expand Down
2 changes: 1 addition & 1 deletion Backends/System/iOS/Sources/kinc/backend/system.m.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ int kinc_init(const char *name, int width, int height, struct kinc_window_option
}
kinc_g4_internal_init();
kinc_g4_internal_init_window(0, frame->depth_bits, frame->stencil_bits, true);

#ifdef KINC_KONG
kong_init();
#endif
Expand Down
4 changes: 2 additions & 2 deletions Backends/System/macOS/Sources/kinc/backend/system.m.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,11 @@ int kinc_init(const char *name, int width, int height, kinc_window_options_t *wi
int windowId = createWindow(win);
kinc_g4_internal_init();
kinc_g4_internal_init_window(windowId, frame->depth_bits, frame->stencil_bits, true);

#ifdef KINC_KONG
kong_init();
#endif

return 0;
}

Expand Down

0 comments on commit d46ff88

Please sign in to comment.