### Accommodate SDL2 Header Path for vcpkg (SDL2 Example) Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt The SDL2 example has been updated to accommodate variations in SDL2 header installation paths when using vcpkg, specifically handling 'SDL2/SDL.h' versus 'SDL.h'. ```c Accommodate for vcpkg install having headers in SDL2/SDL.h vs SDL.h. ``` -------------------------------- ### OpenGL Examples Makefiles Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Various makefiles for OpenGL examples on MINGW and Linux systems. ```makefile # Example Makefile Snippet # This is a placeholder for actual makefile content. # Actual makefiles for MINGW and Linux would be here. ``` -------------------------------- ### Add DirectX 12 Example Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Includes a new example demonstrating the use of DirectX 12. ```c++ Examples: DirectX12: Added DirectX 12 example. (#301) [@jdm3] ``` -------------------------------- ### Handle Alt+Enter in DX12 Example App Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt The DX12 example application now correctly handles the Alt+Enter key combination, utilizing the swapchain's ResizeBuffers for this functionality. This improves window management within the example. ```c Fixed handling of Alt+Enter in example app (using swapchain's ResizeBuffers). ``` -------------------------------- ### Include Changelog in Example Files Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Example files now include their own changelogs, making it easier to update backends independently. ```c++ Examples: Files in examples/ now include their own changelog so it is easier to occasionally update your backends if needed. ``` -------------------------------- ### SDL Example: Initialize Video and Timer Subsystems Only Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt The SDL example now initializes only the video and timer subsystems. Reduces unnecessary dependencies and resource usage. ```c++ SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER); ``` -------------------------------- ### SDL+Metal Example Addition Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Adds a new SDL+Metal example application. ```c++ // Added SDL+Metal example application. ``` -------------------------------- ### Examples Updated to GLFW 3.1 Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Updates the example applications to use GLFW version 3.1 and moves them into the examples/libs/ folder for better organization. ```cpp Examples: Updated to GLFW 3.1. Moved to examples/libs/ folder. ``` -------------------------------- ### Improve Selectable() Examples Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt The examples for the Selectable() widget have been improved for better clarity and demonstration. ```c++ Demo: Improved Selectable() examples. (#1528) ``` -------------------------------- ### ShowTestWindow Manipulating Window Title Example Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Adds a new example to ShowTestWindow demonstrating how to manipulate window titles dynamically. ```cpp ShowTestWindow: Added "Manipulating Window Title" example. ``` -------------------------------- ### Emscripten+WebGPU Example - Latest WebGPU Specs Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Fixes building the Emscripten+WebGPU example for the latest WebGPU specifications. ```cpp Emscripten+WebGPU ``` -------------------------------- ### Vertex Shader Example Source: https://github.com/stenzek/duckstation/blob/master/data/resources/shaders/reshade/REFERENCE.md An example of a vertex shader that generates a simple fullscreen triangle. ```APIDOC ## VS Example ### Description Generates a simple fullscreen triangle using the three vertices provided by ReShade. ### Method N/A (Shader Function) ### Endpoint N/A (Shader Function) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) * **position** (float4) - Semantic: SV_Position * **texcoord** (float2) - Semantic: TEXCOORD0 ### Response Example N/A ```hlsl void ExampleVS(uint id : SV_VertexID, out float4 position : SV_Position, out float2 texcoord : TEXCOORD0) { texcoord.x = (id == 2) ? 2.0 : 0.0; texcoord.y = (id == 1) ? 2.0 : 0.0; position = float4(texcoord * float2(2, -2) + float2(-1, 1), 0, 1); } ``` ``` -------------------------------- ### DirectX9 Example: Full Device State Saving Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt The DirectX9 example now saves and restores all device state. Ensures a clean state after ImGui rendering. ```c++ // Save all DirectX9 device state // ... // Restore all DirectX9 device state ``` -------------------------------- ### Remove Unnecessary Backend Device Recreation (DX12 Example) Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt The DX12 example application has been updated to remove the unnecessary recreation of backend-owned device objects when the window is resized. This optimizes the resizing process. ```c Removed unnecessary recreation of backend-owned device objects when window is resized. ``` -------------------------------- ### Add Mouse Cursor Shape Support for SDL Example Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt The SDL example now includes support for mouse cursor shapes. ```c++ Examples: SDL: Added support for mouse cursor shapes. (#1626) [@olls] ``` -------------------------------- ### Install Ubuntu/Debian Dependencies Source: https://github.com/stenzek/duckstation/blob/master/README.md Installs all necessary packages for building DuckStation on Ubuntu/Debian-based systems. ```bash sudo apt update && sudo apt install autoconf automake build-essential clang cmake curl extra-cmake-modules git libasound2-dev libcurl4-openssl-dev libdbus-1-dev libdecor-0-dev libegl-dev libevdev-dev libfontconfig-dev libfreetype-dev libgtk-3-dev libgudev-1.0-dev libharfbuzz-dev libinput-dev libopengl-dev libpipewire-0.3-dev libpulse-dev libssl-dev libudev-dev libwayland-dev libx11-dev libx11-xcb-dev libxcb1-dev libxcb_composite0-dev libxcb-cursor-dev libxcb_damage0-dev libxcb_glx0-dev libxcb_icccm4-dev libxcb_image0-dev libxcb_keysyms1-dev libxcb_present0-dev libxcb_randr0-dev libxcb_render0-dev libxcb_render_util0-dev libxcb_shape0-dev libxcb_shm0-dev libxcb_sync-dev libxcb_util-dev libxcb_xfixes0-dev libxcb_xinput-dev libxcb_xkb-dev libxext-dev libxkbcommon-x11-dev libxrandr-dev libxss-dev libtool lld llvm nasm ninja-build pkg-config zlib1g-dev ``` -------------------------------- ### SDL+DX11 Example Fixes Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Fixes resizing issues with the main window in the SDL+DX11 example application. ```c++ // Fixed resizing main window. ``` -------------------------------- ### Refactored Backend Structure in ImGui Examples Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Illustrates the refactoring of ImGui example backends to separate platform and renderer code. This change aims to reduce redundancy and improve reusability, facilitating easier integration into custom engines and future multi-viewport support. ```cpp before: imgui_impl_dx11.cpp --> after: imgui_impl_win32.cpp + imgui_impl_dx11.cpp before: imgui_impl_dx12.cpp --> after: imgui_impl_win32.cpp + imgui_impl_dx12.cpp before: imgui_impl_glfw_gl3.cpp --> after: imgui_impl_glfw.cpp + imgui_impl_opengl2.cpp before: imgui_impl_glfw_vulkan.cpp --> after: imgui_impl_glfw.cpp + imgui_impl_vulkan.cpp before: imgui_impl_sdl_gl3.cpp --> after: imgui_impl_sdl2.cpp + imgui_impl_opengl2.cpp before: imgui_impl_sdl_gl3.cpp --> after: imgui_impl_sdl2.cpp + imgui_impl_opengl3.cpp etc. ``` -------------------------------- ### Project and Include Directories Configuration Source: https://github.com/stenzek/duckstation/blob/master/dep/fmt/CMakeLists.txt Initializes the project and sets the installation directory for include files. This configuration is essential for managing project structure and dependencies. ```cmake project(FMT CXX) include(GNUInstallDirs) set_verbose(FMT_INC_DIR ${CMAKE_INSTALL_INCLUDEDIR} CACHE STRING "Installation directory for include files, a relative path that " "will be joined with ${CMAKE_INSTALL_PREFIX} or an absolute path.") ``` -------------------------------- ### Install Fedora Dependencies Source: https://github.com/stenzek/duckstation/blob/master/README.md Installs all necessary packages for building DuckStation on Fedora-based systems. ```bash sudo dnf install alsa-lib-devel autoconf automake brotli-devel clang cmake dbus-devel egl-wayland-devel extra-cmake-modules fontconfig-devel gcc-c++ gtk3-devel libavcodec-free-devel libavformat-free-devel libavutil-free-devel libcurl-devel libdecor-devel libevdev-devel libICE-devel libinput-devel libSM-devel libswresample-free-devel libswscale-free-devel libX11-devel libXau-devel libxcb-devel libXcomposite-devel libXcursor-devel libXext-devel libXfixes-devel libXft-devel libXi-devel libxkbcommon-devel libxkbcommon-x11-devel libXpresent-devel libXrandr-devel libXrender-devel libXScrnSaver-devel libtool lld llvm make mesa-libEGL-devel mesa-libGL-devel nasm ninja-build openssl-devel patch pcre2-devel perl-Digest-SHA pipewire-devel pulseaudio-libs-devel systemd-devel wayland-devel xcb-util-cursor-devel xcb-util-devel xcb-util-errors-devel xcb-util-image-devel xcb-util-keysyms-devel xcb-util-renderutil-devel xcb-util-wm-devel xcb-util-xrm-devel zlib-devel ``` -------------------------------- ### Use Dark Theme by Default Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Examples now use a dark theme by default, with adjustments made to the demo code. ```c++ Examples: Using Dark theme by default. (#707). Tweaked demo code. ``` -------------------------------- ### Win32+DX12 Example Fixes Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Addresses issues with resizing the main window and enables the debug layer in the Win32+DX12 example application. ```c++ // Fixed resizing main window, enabled debug layer. ``` -------------------------------- ### Handle Double-Click Messages in Win32 Examples Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Win32 examples now support windows using the CS_DBLCLKS class flag by handling double-click messages (e.g., WM_LBUTTONDBLCLK). ```c++ Examples: Win32 (DirectX9,10,11,12: Support for windows using the CS_DBLCLKS class flag by handling the double-click messages (WM_LBUTTONDBLCLK etc.). (#1538, #754) [@ndandoulakis] ``` -------------------------------- ### Allow DirectX 9/11 Examples Resize Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Enables the DirectX 9 and DirectX 11 example applications to resize the window, providing a more flexible user experience. ```cpp Examples: Allow DirectX 9/11 examples applications to resize the window. ``` -------------------------------- ### Example Console Focus on Input Box Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Ensures the example console maintains focus on the input box at all times, improving the user experience for interactive console input. ```cpp Examples: Example console keeps focus on input box at all times. ``` -------------------------------- ### Begin ImGui Table Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Starts a table with specified flags. Ensure EndTable() is called afterwards. Refer to imgui.h for flag details. ```c ImGui::BeginTable("table_id", column_count); ``` -------------------------------- ### Add ImGui Keys Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt New ImGui keys, ImGuiKey_Insert and ImGuiKey_Space, have been added and are set up in all example backends. These can be used for input handling. ```c++ io.KeyMap[ImGuiKey_Insert] = 0; io.KeyMap[ImGuiKey_Space] = 1; ``` -------------------------------- ### Simplify GL Loader Includes (OpenGL3+GLFW, SDL Examples) Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Includes for supporting various GL loaders have been removed from the OpenGL3+GLFW and SDL examples, as they are no longer necessary due to the embedded loader in the OpenGL3 backend. ```c Remove include cruft to support variety of GL loaders (no longer necessary). ``` -------------------------------- ### Install Zydis using vcpkg Source: https://github.com/stenzek/duckstation/blob/master/dep/zydis/README.md Instructions for installing Zydis using the vcpkg package manager on Windows. This method is maintained by the vcpkg team and community. ```bash git clone https://github.com/Microsoft/vcpkg.git cd vcpkg ./bootstrap-vcpkg.sh ./vcpkg integrate install ./vcpkg install zydis ``` -------------------------------- ### Refactored Example Applications Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Refactored all example applications to simplify isolating and extracting code for OpenGL 2/3, DirectX 9/11, and to provide a more organized format for samples. ```cpp Examples: refactored all examples application to make it easier to isolate and grab the code you need for OpenGL 2/3, DirectX 9/11, and toward a more sensible format for samples. ``` -------------------------------- ### Format a string Source: https://github.com/stenzek/duckstation/blob/master/dep/fmt/README.md Use fmt::format to create a std::string with formatted content. This example shows basic placeholder substitution. ```c++ std::string s = fmt::format("The answer is {}.", 42); // s == "The answer is 42." ``` -------------------------------- ### Add Mouse Cursor Shape Support for Win32 Examples Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Win32 examples (DirectX9, 10, 11, 12) now include support for different mouse cursor shapes. ```c++ Examples: Win32 (DirectX9,10,11,12): Added support for mouse cursor shapes. (#1495) ``` -------------------------------- ### Apple/iOS Example: Lowered Deployment Target Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Lowered the Xcode project deployment target from 10.7 to 10.11 for Apple/iOS examples. Broadens compatibility with older macOS versions. ```objective-c // Deployment target lowered to 10.11 ``` -------------------------------- ### Format Subseconds with fmt/chrono.h Source: https://github.com/stenzek/duckstation/blob/master/dep/fmt/ChangeLog.md Illustrates formatting of subseconds for durations using `fmt/chrono.h`. This example shows how to print microseconds with fractional seconds. ```cpp #include int main() { // prints 01.234567 fmt::print("{:%S} ", std::chrono::microseconds(1234567)); } ``` -------------------------------- ### Win32 Backend DPI Awareness Helpers Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Provides helper functions for Win32 backend to enable DPI awareness and get DPI scaling factors. These functions assist example applications in supporting hi-dpi features without manifest setup. ```c++ ImGui_ImplWin32_EnableDpiAwareness(); ImGui_ImplWin32_GetDpiScaleForHwnd(hwnd); ImGui_ImplWin32_GetDpiScaleForMonitor(monitor); ``` -------------------------------- ### Configure System Boot Parameters Source: https://context7.com/stenzek/duckstation/llms.txt Programmatically initialize the emulator using SystemBootParameters and the System::BootSystem method. ```cpp #include "system.h" // Create boot parameters for a game SystemBootParameters params; params.path = "/path/to/game.cue"; params.override_fast_boot = true; // Skip BIOS splash params.override_fullscreen = true; // Start in fullscreen params.override_start_paused = false; // Don't start paused params.load_image_to_ram = true; // Preload disc to RAM params.media_playlist_index = 0; // First disc in multi-disc set // Boot with save state params.save_state = "/path/to/savestate.sav"; // Boot with EXE override (homebrew testing) params.override_exe = "/path/to/homebrew.exe"; // Disable achievements hardcore mode params.disable_achievements_hardcore_mode = true; // Start media capture on boot params.start_media_capture = true; // Boot the system Error error; if (!System::BootSystem(params, &error)) { // Handle boot failure printf("Boot failed: %s\n", error.GetDescription().c_str()); } ``` -------------------------------- ### Disassemble Memory Buffer Source: https://github.com/stenzek/duckstation/blob/master/dep/zydis/README.md Example of using Zydis to disassemble a memory buffer and print the output. Requires no special setup beyond including the Zydis headers. ```asm 007FFFFFFF400000 push rcx 007FFFFFFF400001 lea eax, [rbp-0x01] 007FFFFFFF400004 push rax 007FFFFFFF400005 push qword ptr [rbp+0x0C] 007FFFFFFF400008 push qword ptr [rbp+0x08] 007FFFFFFF40000B call [0x008000007588A5B1] 007FFFFFFF400011 test eax, eax 007FFFFFFF400013 js 0x007FFFFFFF42DB15 ``` -------------------------------- ### Remove Glew Dependency for OpenGL Examples Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Removes the dependency on Glew for OpenGL examples and also removes the Glew binaries for Windows, simplifying the build process for these examples. ```cpp Examples: Removed dependency on Glew for OpenGL examples. Removed Glew binaries for Windows. ``` -------------------------------- ### Creating a Window with MenuBar and Widgets Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/README.md Shows how to create a window with a menu bar, including menu items, color editing, plotting, and a scrolling child region. This example illustrates a more complex UI structure within Dear ImGui. ```cpp // Create a window called "My First Tool", with a menu bar. ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar); if (ImGui::BeginMenuBar()) { if (ImGui::BeginMenu("File")) { if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ } if (ImGui::MenuItem("Save", "Ctrl+S")) { /* Do stuff */ } if (ImGui::MenuItem("Close", "Ctrl+W")) { my_tool_active = false; } ImGui::EndMenu(); } ImGui::EndMenuBar(); } // Edit a color stored in 4 floats ImGui::ColorEdit4("Color", my_color); // Generate samples and plot them float samples[100]; for (int n = 0; n < 100; n++) samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f); ImGui::PlotLines("Samples", samples, 100); // Display contents in a scrolling region ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff"); ImGui::BeginChild("Scrolling"); for (int n = 0; n < 50; n++) ImGui::Text("%04d: Some text", n); ImGui::EndChild(); ImGui::End(); ``` -------------------------------- ### Iostreams Formatting Example Source: https://github.com/stenzek/duckstation/blob/master/dep/fmt/README.md Illustrates the verbosity of C++ iostreams for formatting floating-point numbers with specific precision and fixed notation. Requires including ``, ``. ```c++ std::cout << std::setprecision(2) << std::fixed << 1.23456 << "\n"; ``` -------------------------------- ### Set BackendFlags for Mouse Cursors and Gamepad Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt All examples now set io.BackendFlags to indicate support for mouse cursors and gamepads. ```c++ Examples: All examples now setup the io.BackendFlags to signify they can honor mouse cursors, gamepad, etc. ``` -------------------------------- ### Improved width computation with Unicode Source: https://github.com/stenzek/duckstation/blob/master/dep/fmt/ChangeLog.md Example showing improved width computation for left-aligned strings, including Unicode characters. Requires including . ```cpp #include int main() { fmt::print("{:-<10}{}\n", "你好", "世界"); fmt::print("{:-<10}{}\n", "hello", "world"); } ``` -------------------------------- ### Setup Table Column Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Configures a specific column's properties like width, sortability, and flags. Call before any rows are added. ```c ImGui::TableSetupColumn("Column Name", ImGuiTableColumnFlags_WidthStretch); ``` -------------------------------- ### Initialize Shader Uniforms and Constants Source: https://github.com/stenzek/duckstation/blob/master/data/resources/shaders/reshade/REFERENCE.md Demonstrates the syntax for initializing uniform variables and static constants. Prefer constants for values that do not change. ```hlsl // Initializers are used to specify the default value (zero is used if not specified). uniform float4 UniformSingleValue = float4(0.0f, 0.0f, 0.0f, 0.0f); // It is recommended to use constants instead of uniforms if the value is not changing or user-configurable. static const float4 ConstantSingleValue = float4(0.0f, 0.0f, 0.0f, 0.0f); ``` -------------------------------- ### Define a ReShade Technique and Pass Source: https://github.com/stenzek/duckstation/blob/master/data/resources/shaders/reshade/REFERENCE.md Example of a technique block with a single pass, demonstrating various render states and shader assignments. ```hlsl technique Example < ui_tooltip = "This is an example!"; > { pass p0 { // The primitive topology rendered in the draw call. // Available values: // POINTLIST, LINELIST, LINESTRIP, TRIANGLELIST, TRIANGLESTRIP PrimitiveTopology = TRIANGLELIST; // or PrimitiveType // The number of vertices ReShade generates for the draw call. // This has different effects on the rendered primitives based on the primitive topology. // A triangle list needs 3 separate vertices for every triangle for example, a strip on the other hand reuses the last 2, so only 1 is needed for every additional triangle. VertexCount = 3; // The following two accept function names declared above which are used as entry points for the shader. // Please note that all parameters must have an associated semantic so the runtime can match them between shader stages. VertexShader = ExampleVS; PixelShader = ExamplePS0; // The number of thread groups to dispatch when a compute shader is used. DispatchSizeX = 1; DispatchSizeY = 1; DispatchSizeZ = 1; // Compute shaders are specified with the number of threads per thread group in brackets. // The following for example will create groups of 64x1x1 threads: ComputeShader = ExampleCS0<64,1,1>; // RenderTarget0 to RenderTarget7 allow to set one or more render targets for rendering to textures. // Set them to a texture name declared above in order to write the color output (SV_Target0 to RenderTarget0, SV_Target1 to RenderTarget1, ...) to this texture in this pass. // If multiple render targets are used, the dimensions of them has to match each other. // If no render targets are set here, RenderTarget0 points to the backbuffer. // Be aware that you can only read **OR** write a texture at the same time, so do not sample from it while it is still bound as render target here. // RenderTarget and RenderTarget0 are aliases. RenderTarget = texTarget; // Set to true to clear all bound render targets to zero before rendering. ClearRenderTargets = false; // Set to false to disable automatic rebuilding of the mipmap chain of all render targets and/or storage objects. // This is useful when using a compute shader that writes to specific mipmap levels, rather than relying on the automatic generation. GenerateMipMaps = true; // A mask applied to the color output before it is written to the render target. RenderTargetWriteMask = 0xF; // or ColorWriteEnable // Enable or disable gamma correction applied to the output. SRGBWriteEnable = false; // BlendEnable0 to BlendEnable7 allow to enable or disable color and alpha blending for the respective render target. // Don't forget to also set "ClearRenderTargets" to "false" if you want to blend with existing data in a render target. // BlendEnable and BlendEnable0 are aliases, BlendEnable = false; // The operator used for color and alpha blending. // To set these individually for each render target, append the render target index to the pass state name, e.g. BlendOp3 for the fourth render target (zero-based index 3). // Available values: // ADD, SUBTRACT, REVSUBTRACT, MIN, MAX BlendOp = ADD; BlendOpAlpha = ADD; // The data source and optional pre-blend operation used for blending. ``` -------------------------------- ### Fix Event Forwarding for OSX+OpenGL2 Example Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt The OSX+OpenGL2 example now has a fix for event forwarding, specifically addressing keys remaining stuck when using shortcuts with the Cmd/Super key. Other OSX examples were not affected by this issue. ```c Fix event forwarding (fix key remaining stuck when using shortcuts with Cmd/Super key). ``` -------------------------------- ### Initialize GLFW Backend for Non-OpenGL APIs Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Use ImGui_ImplGlfw_InitForOther() for GLFW initialization when not using OpenGL. ```c ImGui_ImplGlfw_InitForOther(window, false); ``` -------------------------------- ### OSX+Metal, OSX+OpenGL Examples - ImGui_ImplOSX_HandleEvent() Removal Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Removed now-unnecessary calls to ImGui_ImplOSX_HandleEvent() in the OSX+Metal and OSX+OpenGL examples. ```cpp ImGui_ImplOSX_HandleEvent() ``` -------------------------------- ### Clone and Configure format-benchmark Repository Source: https://github.com/stenzek/duckstation/blob/master/dep/fmt/README.md Clone the format-benchmark repository and its submodules, then configure it using CMake. This is a prerequisite for running the benchmarks. ```bash git clone --recursive https://github.com/fmtlib/format-benchmark.git cd format-benchmark cmake . ``` -------------------------------- ### Initialize DX12 Backend with Descriptor Heap Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt The ImGui_ImplDX12_Init function now requires an extra ID3D12DescriptorHeap parameter. This parameter is reserved for future multi-viewport functionality. ```c ImGui_ImplDX12_Init(pDevice, NUM_FRAMES_IN_FLIGHT, BACK_BUFFER_FORMAT, NUM_RENDER_TARGETS, NUM_SRVS, pDescriptorHeap); ``` -------------------------------- ### Fix OpenGL Windows Examples Link Warning Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Resolves a link warning that occurred specifically with the OpenGL windows examples. ```cpp Examples: Fixed link warning for OpenGL windows examples. ``` -------------------------------- ### Experimental fmt::writer API Example Source: https://github.com/stenzek/duckstation/blob/master/dep/fmt/ChangeLog.md Demonstrates the usage of the experimental `fmt::writer` API for writing to different destinations like files, `fmt::ostream`, and `std::string`. Include `` for file operations. ```c++ #include void write_text(fmt::writer w) { w.print("The answer is {}.", 42); } int main() { // Write to FILE. write_text(stdout); // Write to fmt::ostream. auto f = fmt::output_file("myfile"); write_text(f); // Write to std::string. auto sb = fmt::string_buffer(); write_text(sb); std::string s = sb.str(); } ``` -------------------------------- ### System Boot Configuration Source: https://context7.com/stenzek/duckstation/llms.txt Programmatically configure emulator boot parameters using the SystemBootParameters structure in C++. ```APIDOC ## System::BootSystem ### Description Initializes the emulator system with custom boot parameters. ### Parameters #### Request Body - **path** (string) - Required - Path to the game file - **override_fast_boot** (boolean) - Optional - Skip BIOS splash - **override_fullscreen** (boolean) - Optional - Start in fullscreen - **override_start_paused** (boolean) - Optional - Start paused - **load_image_to_ram** (boolean) - Optional - Preload disc to RAM - **media_playlist_index** (integer) - Optional - Index for multi-disc sets - **save_state** (string) - Optional - Path to save state file - **override_exe** (string) - Optional - Path to homebrew EXE - **disable_achievements_hardcore_mode** (boolean) - Optional - Disable hardcore mode - **start_media_capture** (boolean) - Optional - Start media capture on boot ### Response #### Success Response - **bool** - Returns true if the system booted successfully. #### Error Handling - **Error** - Returns an error object containing a description if the boot fails. ``` -------------------------------- ### DirectX9 Example: Removed d3dx9 Dependency Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Removed dependency on d3dx9.h, d3dx9.lib, and dxguid.lib from the DirectX9 example. Allows usage in environments with only DirectXMath.h. ```c++ // No longer requires d3dx9.h, d3dx9.lib, dxguid.lib ``` -------------------------------- ### Example Applications Vsync Enabled Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Enabled vsync by default in example applications to prevent excessively high frame rates and CPU usage. ```c++ Examples: Enabled vsync by default in example applications, so it doesn't confuse people that the sample run at 2000+ fps and waste an entire CPU. (#1213, #1151). ``` -------------------------------- ### Fix DirectX10 Example: ClearInputData() Call Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Corrected an erroneous call to io.Fonts->ClearInputData() + ClearTexData() in the DirectX10 example, which was removed in later versions. ```c++ Examples: DirectX10: Fixed erroneous call to io.Fonts->ClearInputData() + ClearTexData() that was left in DX10 example but removed in 1.47 (Nov 2015) in every other backends. (#1733) ``` -------------------------------- ### Windows Build and Deployment Configuration Source: https://github.com/stenzek/duckstation/blob/master/src/duckstation-qt/CMakeLists.txt Configures Windows-specific target properties, deploys Qt DLLs, and copies required dependencies to the output directory. ```cmake if(WIN32) target_sources(duckstation-qt PRIVATE duckstation-qt.rc vcruntimecheck.cpp ) # Needed to enable RAIntegration. target_link_libraries(duckstation-qt PRIVATE rcheevos) # We want a Windows subsystem application not console. set_target_properties(duckstation-qt PROPERTIES WIN32_EXECUTABLE TRUE DEBUG_POSTFIX "-debug") # Copy in Qt DLLs. Borrowed from Dolphin. get_target_property(MOC_EXECUTABLE_LOCATION Qt6::moc IMPORTED_LOCATION) get_filename_component(QT_BINARY_DIRECTORY "${MOC_EXECUTABLE_LOCATION}" DIRECTORY) find_program(WINDEPLOYQT_EXE windeployqt HINTS "${QT_BINARY_DIRECTORY}") add_custom_command(TARGET duckstation-qt POST_BUILD COMMAND "${CMAKE_COMMAND}" -E env PATH="${QT_BINARY_DIRECTORY}" "${WINDEPLOYQT_EXE}" --libdir="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" --plugindir="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/QtPlugins" $,--debug,--release> --no-compiler-runtime --no-system-d3d-compiler --no-system-dxc-compiler --no-translations "$" ) add_custom_command(TARGET duckstation-qt POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/qt.conf.win" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/qt.conf" ) #set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/translations") set(DEPS_TO_COPY cpuinfo.dll discord-rpc.dll dxcompiler.dll dxil.dll freetype.dll harfbuzz.dll jpeg62.dll libpng16.dll libsharpyuv.dll libwebp.dll libwebpdemux.dll libwebpmux.dll plutosvg.dll SDL3.dll shaderc_shared.dll soundtouch.dll spirv-cross-c-shared.dll zip.dll zlib1.dll zstd.dll) foreach(DEP ${DEPS_TO_COPY}) list(APPEND DEP_BINS "${CMAKE_PREFIX_PATH}/bin/${DEP}") endforeach() add_custom_command(TARGET duckstation-qt POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${DEP_BINS} "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" ) if(CMAKE_BUILD_TYPE MATCHES "Debug|Devel") get_property(WINPIXEVENTRUNTIME_DLL TARGET WinPixEventRuntime::WinPixEventRuntime PROPERTY IMPORTED_LOCATION) message(STATUS WP "${WINPIXEVENTRUNTIME_DLL}") add_custom_command(TARGET duckstation-qt POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${WINPIXEVENTRUNTIME_DLL}" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" ) endif() ``` -------------------------------- ### DirectX11/X11 Example: D3DCompiler Dependency Comment Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Added comments in the DirectX11/X11 examples regarding the removal of the D3DCompiler dependency. Facilitates easier integration into projects. ```c++ // Note: D3DCompiler dependency can be removed. ``` -------------------------------- ### Basic ImGui Widgets Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/README.md Demonstrates the usage of common Dear ImGui widgets like Text, Button, InputText, and SliderFloat. These can be called from anywhere in your program loop after Dear ImGui is set up. ```cpp ImGui::Text("Hello, world %d", 123); if (ImGui::Button("Save")) MySaveFunction(); ImGui::InputText("string", buf, IM_ARRAYSIZE(buf)); ImGui::SliderFloat("float", &f, 0.0f, 1.0f); ``` -------------------------------- ### BeginPopupContextItem() and BeginPopupContextWindow() Optimization Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Added an early out optimization for BeginPopupContextItem() and BeginPopupContextWindow(). This improves performance by skipping unnecessary checks. ```cpp bool BeginPopupContextItem(const char* str_id = NULL, ImGuiPopupFlags popup_flags = 0); ``` ```cpp bool BeginPopupContextWindow(const char* str_id = NULL, ImGuiPopupFlags popup_flags = 0); ``` -------------------------------- ### Create Portable Build Source: https://github.com/stenzek/duckstation/blob/master/README.md Creates an empty file named `portable.txt` to enable a portable build where the user directory is the same as the executable location. ```bash touch portable.txt ``` -------------------------------- ### Initialize Vulkan Backend Functions Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Call ImGui_ImplVulkan_LoadFunctions with a custom loader before using other Vulkan backend functions. ```c ImGui_ImplVulkan_LoadFunctions(custom_loader); ``` -------------------------------- ### Forward Cursor Enter Callback Data (GLFW Backend) Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt If ImGui_ImplGlfw_InitXXX was called with install_callbacks=false, you need to install the glfwSetCursorEnterCallback() and forward the data to ImGui_ImplGlfw_CursorEnterCallback(). This is necessary for correct mouse position reporting when the window is hovered but not focused. ```c ImGui_ImplGlfw_CursorEnterCallback() ``` -------------------------------- ### OpenGL3 Example: glActiveTexture State Saving Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt The OpenGL3 example now saves and restores the glActiveTexture() state. Prevents unintended texture unit changes in other parts of the application. ```c++ // Save glActiveTexture state // ... // Restore glActiveTexture state ``` -------------------------------- ### macOS Bundle Configuration Source: https://github.com/stenzek/duckstation/blob/master/src/duckstation-qt/CMakeLists.txt Sets up macOS bundle properties and handles post-processing for Qt library injection. ```cmake elseif(APPLE) # Don't generate a bundle for XCode, it makes code signing fail... get_scm_version() set(BUNDLE_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/DuckStation.app) set_target_properties(duckstation-qt PROPERTIES MACOSX_BUNDLE true MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in OUTPUT_NAME DuckStation ) if(CMAKE_GENERATOR MATCHES "Xcode") set_target_properties(duckstation-qt PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "" XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED NO XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED NO ) elseif(NOT SKIP_POSTPROCESS_BUNDLE) # Inject Qt Libraries into bundle. find_program(MACDEPLOYQT_EXE macdeployqt HINTS "${QT_BINARY_DIRECTORY}") add_custom_target(duckstation-postprocess-bundle ALL COMMAND "${MACDEPLOYQT_EXE}" "${BUNDLE_PATH}" -no-strip ) add_dependencies(duckstation-postprocess-bundle duckstation-qt) endif() # Copy icon into the bundle target_sources(duckstation-qt PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/DuckStation.icns") set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/DuckStation.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources) endif() ``` -------------------------------- ### Launch DuckStation via Command Line Source: https://context7.com/stenzek/duckstation/llms.txt Use these CLI arguments to control emulator boot behavior, display modes, and save state loading. ```bash # Basic usage - launch a game duckstation-qt /path/to/game.cue # Launch in fullscreen mode duckstation-qt -fullscreen /path/to/game.iso # Fast boot (skip BIOS intro) duckstation-qt -fastboot /path/to/game.chd # Slow boot (force BIOS intro) duckstation-qt -slowboot /path/to/game.bin # Load a specific save state slot duckstation-qt -state 3 /path/to/game.cue # Load resume save state duckstation-qt -resume /path/to/game.cue # Load most recent resume state (no game specified) duckstation-qt -resume # Load save state from specific file duckstation-qt -statefile /path/to/savestate.sav # Batch mode - exit after powering off duckstation-qt -batch /path/to/game.cue # Portable mode - store data in executable directory duckstation-qt -portable /path/to/game.cue # Disable controller polling (troubleshooting) duckstation-qt -nocontroller /path/to/game.cue # Use custom settings file duckstation-qt -settings /path/to/custom_settings.ini /path/to/game.cue # Handle filenames with spaces or dashes duckstation-qt -fullscreen -- "/path/to/My Game - Disc 1.cue" # Display help duckstation-qt -help # Display version duckstation-qt -version ``` -------------------------------- ### DirectX10/X11 Example: Depth-Stencil State Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Applies depth-stencil state in the DirectX10/X11 examples without using a depth buffer. Useful for rendering scenarios where depth testing is managed differently. ```c++ // Apply depth-stencil state ``` -------------------------------- ### Set Output Directories and Platform Definitions Source: https://github.com/stenzek/duckstation/blob/master/CMakeLists.txt Configures binary output paths and enables large file support for 32-bit platforms. ```cmake # Write binaries to a seperate directory. set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin") # Enable large file support on Linux 32-bit platforms. if(CMAKE_SIZEOF_VOID_P EQUAL 4) add_definitions("-D_FILE_OFFSET_BITS=64") endif() # Optional unit tests. if(BUILD_TESTS) enable_testing() endif() ``` -------------------------------- ### Add Mouse Cursor Shape Support for GLFW Example Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt The GLFW example now includes support for mouse cursor shapes, though diagonal resize cursors are not supported by GLFW. ```c++ Examples: GLFW: Added support for mouse cursor shapes (the diagonal resize cursors are unfortunately not supported by GLFW at the moment. (#1495) ``` -------------------------------- ### Create ImGui Context Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt You must now explicitly call ImGui::CreateContext() at the beginning of your application and ImGui::DestroyContext() at the end. Failure to do so will result in assertions or crashes. ```c++ ImGui::CreateContext(); ``` -------------------------------- ### Command Line Interface Source: https://context7.com/stenzek/duckstation/llms.txt The DuckStation CLI allows users to launch games with specific boot behaviors, display modes, and configuration overrides. ```APIDOC ## CLI Usage ### Description Launch the DuckStation emulator with various flags to control game execution, display settings, and state management. ### Usage `duckstation-qt [options] [path/to/game]` ### Options - **-fullscreen** - Launch in fullscreen mode - **-fastboot** - Skip BIOS intro - **-slowboot** - Force BIOS intro - **-state [slot]** - Load a specific save state slot - **-resume** - Load resume save state - **-statefile [path]** - Load save state from a specific file - **-batch** - Exit after powering off - **-portable** - Store data in executable directory - **-nocontroller** - Disable controller polling - **-settings [path]** - Use custom settings file - **-help** - Display help - **-version** - Display version ``` -------------------------------- ### Get Table Column Name Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Retrieves the name of a table column by its index. ```c ImGui::TableGetColumnName(column_idx); ``` -------------------------------- ### LZMA Decoder Initialization and Usage Source: https://github.com/stenzek/duckstation/blob/master/dep/lzma/lzma.txt Demonstrates the initialization of an LZMA decoder, followed by a loop to decode data into a buffer. It includes freeing allocated structures. ```APIDOC ## LZMA Decoder Initialization and Usage ### Description Initializes an LZMA decoder, processes data in a loop using `LzmaDec_DecodeToBuf`, and frees the decoder state. ### Method N/A (C API usage example) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example ```c LzmaDec state; // ... other variables like dest, destLen, src, srcLen, finishMode LzmaDec_Init(&state); for (;;) { // ... int res = LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode); // ... } LzmaDec_Free(&state, &g_Alloc); ``` ### Response #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### Get Table Column Flags Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Retrieves the flags associated with a specific table column. ```c ImGui::TableGetColumnFlags(column_idx); ``` -------------------------------- ### Get Table Column Count Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Returns the total number of columns in the current table. ```c ImGui::TableGetColumnCount(); ``` -------------------------------- ### Manage User Directory Paths Source: https://context7.com/stenzek/duckstation/llms.txt Identify platform-specific user data locations and enable portable mode by creating a portable.txt file. ```bash # Default user directory locations: # Windows %LOCALAPPDATA%\DuckStation # Example: C:\Users\\AppData\Local\DuckStation # Linux $XDG_DATA_HOME/duckstation # Example: ~/.local/share/duckstation # macOS ~/Library/Application Support/DuckStation # Android /duckstation # Example: /sdcard/duckstation # Directory structure: / ├── bios/ # BIOS ROM images ├── cache/ # Shader and texture caches ├── cheats/ # Cheat files ├── covers/ # Game cover images ├── dump/ # Memory dumps ├── inputprofiles/ # Controller input profiles ├── memcards/ # Memory card files ├── savestates/ # Save state files ├── screenshots/ # Screenshots ├── shaders/ # Custom shaders ├── textures/ # Texture replacements │ └── / │ ├── config.yaml │ ├── dumps/ │ └── replacements/ ├── gamecontrollerdb.txt # SDL controller mappings (optional) ├── settings.ini # Configuration file └── duckstation.log # Log file (when enabled) # Portable mode - create empty file in executable directory: touch portable.txt # All data stored alongside the executable ``` -------------------------------- ### Use 3.2 Context for OpenGL3+GLFW Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt The OpenGL3+GLFW example now uses a 3.2 context instead of 3.3. ```c++ Examples: OpenGL3+GLFW: Using 3.2 context instead of 3.3. (#1466) ``` -------------------------------- ### Configure Utility Library Dependencies and Sources Source: https://github.com/stenzek/duckstation/blob/master/src/util/CMakeLists.txt Sets up include directories for shader libraries and conditionally adds platform-specific source files and dependencies. ```cmake get_target_property(SHADERC_INCLUDE_DIR Shaderc::shaderc_shared INTERFACE_INCLUDE_DIRECTORIES) get_target_property(SPIRV_CROSS_INCLUDE_DIR spirv-cross-c-shared INTERFACE_INCLUDE_DIRECTORIES) target_include_directories(util PUBLIC ${SHADERC_INCLUDE_DIR} ${SPIRV_CROSS_INCLUDE_DIR}) if(NOT ANDROID) target_sources(util PRIVATE cubeb_audio_stream.cpp sdl_audio_stream.cpp sdl_input_source.cpp sdl_input_source.h ) target_compile_definitions(util PUBLIC ENABLE_SDL ) target_link_libraries(util PUBLIC cubeb SDL3::SDL3 ) # FFmpeg loaded dynamically on demand. target_include_directories(util PUBLIC ${FFMPEG_INCLUDE_DIRS}) endif() ``` ```cmake if(WIN32) target_sources(util PRIVATE d3d_common.cpp d3d_common.h d3d11_device.cpp d3d11_device.h d3d11_pipeline.cpp d3d11_pipeline.h d3d11_stream_buffer.cpp d3d11_stream_buffer.h d3d11_texture.cpp d3d11_texture.h d3d12_builders.cpp d3d12_builders.h d3d12_descriptor_heap_manager.cpp d3d12_descriptor_heap_manager.h d3d12_device.cpp d3d12_device.h d3d12_pipeline.cpp d3d12_pipeline.h d3d12_stream_buffer.cpp d3d12_stream_buffer.h d3d12_texture.cpp d3d12_texture.h dinput_source.cpp dinput_source.h http_downloader_winhttp.cpp win32_raw_input_source.cpp win32_raw_input_source.h xinput_source.cpp xinput_source.h ) target_link_libraries(util PRIVATE d3d12ma) target_link_libraries(util PRIVATE Cfgmgr32.lib Dwmapi.lib winhttp.lib) if(CMAKE_BUILD_TYPE MATCHES "Debug|Devel") target_link_libraries(util PRIVATE WinPixEventRuntime::WinPixEventRuntime) endif() elseif(APPLE) set(MAC_SOURCES metal_device.h metal_device.mm metal_stream_buffer.h metal_stream_buffer.mm ) set(METAL_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/metal_shaders.metal" ) set_property(GLOBAL PROPERTY UTIL_METAL_SOURCES ${METAL_SOURCES}) target_sources(util PRIVATE ${MAC_SOURCES}) find_library(IOK_LIBRARY IOKit REQUIRED) find_library(METAL_LIBRARY Metal) find_library(QUARTZCORE_LIBRARY QuartzCore) target_link_libraries(util PRIVATE ${METAL_LIBRARY} ${QUARTZCORE_LIBRARY} ${IOK_LIBRARY}) set_source_files_properties(${MAC_SOURCES} PROPERTIES SKIP_PRECOMPILE_HEADERS TRUE) elseif(NOT ANDROID) if(LINUX) target_link_libraries(util PRIVATE UDEV::UDEV) endif() endif() ``` ```cmake if(NOT WIN32 AND NOT ANDROID) target_sources(util PRIVATE http_downloader_curl.cpp ) target_link_libraries(util PRIVATE CURL::libcurl ) endif() ``` -------------------------------- ### Compute Shader Example 1 Source: https://github.com/stenzek/duckstation/blob/master/data/resources/shaders/reshade/REFERENCE.md A compute shader that writes a color gradient to the 'texTarget' texture. ```APIDOC ## CS Example 1 ### Description Writes a color gradient to the "texTarget" texture. ### Method N/A (Shader Function) ### Endpoint N/A (Shader Function) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) N/A ### Response Example N/A ```hlsl void ExampleCS1(uint3 id : SV_DispatchThreadID, uint3 tid : SV_GroupThreadID) { tex2Dstore(storageTarget, id.xy, float4(tid.xy / float2(20 * 64, 2 * 8), 0, 1)); } ``` ``` -------------------------------- ### Get Current Table Column Index Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Returns the index of the current column being processed in the table. ```c ImGui::TableGetColumnIndex(); ``` -------------------------------- ### Get Current Table Row Index Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Returns the index of the current row being processed in the table. ```c ImGui::TableGetRowIndex(); ``` -------------------------------- ### SDL Backend - Dragging Out Viewport Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Fixed issues with dragging out viewports on certain SDL setups. ```cpp dragging out viewport ``` -------------------------------- ### SDL Backend Metal Initialization Source: https://github.com/stenzek/duckstation/blob/master/dep/imgui/CHANGELOG.txt Adds ImGui_ImplSDL2_InitForMetal() to the SDL backend for API consistency, although the function currently has no implementation. ```c++ ImGui_ImplSDL2_InitForMetal(window); ```