Skip to content

Conversation

@gameknife
Copy link
Owner

No description provided.

gameknife and others added 8 commits October 27, 2025 13:56
- Restructure AGENTS.md from traditional guide to modern agent-specific navigation
- Transform CLAUDE.md into session initialization checklist with time budgets
- Add AGENT_GUIDE/ directory with layered documentation system:
  * core-patterns.md (Layer 1 - 30s reading)
  * contextual-rules.md (Layer 2 - 2.5min reading)
  * quick-commands.md (Layer 3 - 15s reading)
  * README.md with navigation index
- Include .agent_backup.md as discovery mechanism fallback
- Maintain Chinese communication standard and TodoWrite workflow

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- custom the vulkan-binding for imgui on android
- force landscape and pre-rotation
- support my new konkr fit device
- joystick framerate free
- error custom imgui func on non-android platform
- hdri drop recover
- windows move block mouse move
- joystick and keyboard comptible
Copilot AI review requested due to automatic review settings November 16, 2025 08:29
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +49 to +53
{
GAndroidMagicScale = 1280.f / float(extent.width);

extent.height = 1280;
extent.width = floorf(1280 / aspect);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 修正安卓横屏下交换链宽高反置

aspect >= 1 时分支仍然把 extent.height 固定为 1280,而将 extent.width 设为 floorf(1280 / aspect)。横屏设备的宽高会被交换成 720×1280,使渲染和窗口方向相反,画面被压成竖屏。横屏分支应该把 1280 赋给宽度并按比例计算高度,否则 Android 上的分辨率会错误。

Useful? React with 👍 / 👎.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR appears to be a development branch merge that includes multiple enhancements and refactorings:

  • Custom ImGui Vulkan backend implementation for Android compatibility
  • Android screen orientation and aspect ratio handling improvements
  • Enhanced gamepad/joystick input support with sensitivity controls
  • Mouse capture detection for UI interactions
  • Shader rendering logic refinements
  • Documentation restructuring with new Agent guidance system

Reviewed Changes

Copilot reviewed 33 out of 34 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
vcpkg.json Removed vulkan-binding feature from imgui dependency
src/Vulkan/Window.* Added mouse capture state tracking
src/Vulkan/SwapChain.cpp Improved Android aspect ratio handling for portrait/landscape
src/ThirdParty/imgui-custom/* Added custom ImGui Vulkan implementation with rotation support
src/Runtime/ModelViewController.* Enhanced gamepad input with variable speed and separate joystick state
src/Runtime/Engine.cpp Added mouse capture check and HDR texture loading
assets/shaders/* Added ForceExitAfterFirst rendering control flag
android/* Implemented screen orientation locking
AGENT_GUIDE/* New structured documentation for AI agents

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +52 to +53
extent.height = 1280;
extent.width = floorf(1280 / aspect);
Copy link

Copilot AI Nov 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The aspect ratio calculation for landscape mode is incorrect. When aspect >= 1.0 (landscape), you're setting height=1280 and width=1280/aspect, which inverts the intended behavior. For landscape with aspect=1.78, this gives 1280x719 instead of the expected wider dimension. Should be: extent.width=1280 and extent.height=floorf(1280/aspect).

Copilot uses AI. Check for mistakes.
Comment on lines +123 to +125
cameraRotX_ = glm::sign(cameraRotX_) * glm::min(stickThreshold, cameraRotX_ * cameraRotX_);
cameraRotY_ = rightStickY * stickSensitivity;
cameraRotY_ = glm::sign(cameraRotY_) * glm::min(stickThreshold, cameraRotY_ * cameraRotY_);
Copy link

Copilot AI Nov 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The quadratic scaling logic (cameraRotX_ * cameraRotX_) creates non-linear acceleration but is unclear. The formula multiplies a value in range [-1,1] by itself (always positive), then applies the original sign, which may not produce the intended acceleration curve. Consider documenting the intended behavior or using a clearer formula like: glm::sign(cameraRotX_) * glm::min(stickThreshold, glm::abs(cameraRotX_) * cameraRotX_).

Suggested change
cameraRotX_ = glm::sign(cameraRotX_) * glm::min(stickThreshold, cameraRotX_ * cameraRotX_);
cameraRotY_ = rightStickY * stickSensitivity;
cameraRotY_ = glm::sign(cameraRotY_) * glm::min(stickThreshold, cameraRotY_ * cameraRotY_);
cameraRotX_ = glm::sign(cameraRotX_) * glm::min(stickThreshold, glm::abs(cameraRotX_) * cameraRotX_);
cameraRotY_ = rightStickY * stickSensitivity;
cameraRotY_ = glm::sign(cameraRotY_) * glm::min(stickThreshold, glm::abs(cameraRotY_) * cameraRotY_);

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,6 @@
#!/bin/bash
Copy link

Copilot AI Nov 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file has a .bat extension (Windows batch file) but starts with a bash shebang '#!/bin/bash'. This will cause the shebang line to be executed as a batch command on Windows, likely resulting in an error. Either remove the shebang for .bat files or rename the file to .sh if it's meant for bash.

Copilot uses AI. Check for mistakes.
//userSettings_.SkyIdx = 0;
uint32_t newTextureId = Assets::GlobalTexturePool::GetInstance()->LoadHDRTexture(path);
scene_->GetEnvSettings().SkyIdx = newTextureId;
//userSettings_. = 0;
Copy link

Copilot AI Nov 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 1178 contains incomplete commented code '//userSettings_. = 0;'. This appears to be leftover from development. Either complete the comment to explain what was intended, or remove it entirely if it's no longer relevant.

Suggested change
//userSettings_. = 0;

Copilot uses AI. Check for mistakes.
Comment on lines +232 to +233
cameraRotXAbs_ = 0;
cameraRotYAbs_ = 0;
Copy link

Copilot AI Nov 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The absolute rotation values (cameraRotXAbs_, cameraRotYAbs_) are reset to 0 every frame in UpdateCamera(), but they're also used in the rotation calculation on line 216. This means mouse-based rotation (which accumulates in these variables via OnCursorPosition) will only affect rotation for a single frame before being reset, breaking continuous mouse dragging. These should only be reset when the mouse button is released, not every frame.

Suggested change
cameraRotXAbs_ = 0;
cameraRotYAbs_ = 0;
// cameraRotXAbs_ = 0; // Only reset on mouse button release
// cameraRotYAbs_ = 0; // Only reset on mouse button release

Copilot uses AI. Check for mistakes.
@gameknife gameknife merged commit b8a4e87 into main Nov 16, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants