Skip to content

NFSU2 Revived v0.15.16

Choose a tag to compare

@mininxd mininxd released this 07 Nov 07:06
· 151 commits to main since this release

What's Changed in v0.15.16

Crash Fixes & Engine Memory Stability

  • SUV Carpool Memory Expansion: Expanded SUV carpool allocation (0x007fa9d8) alongside standard carpools (0x007fa9d4, 0x007fa9dc) to 48 MB, preventing out-of-memory crashes when exploring the city or encountering SUV traffic in Career and Explore modes:
    for (uint32_t va : {0x007fa9d4u, 0x007fa9d8u, 0x007fa9dcu}) {
        if (memory->writable(va, 4)) {
            uint32_t* pCarpool = static_cast<uint32_t*>(ptr(va, 4));
            if (pCarpool && *pCarpool < 48000) {
                *pCarpool = 48000;
            }
        }
    }
  • CarLoadedRideInfo & Event Pool Expansion: Increased CarLoadedRideInfoSlotPool capacity at 0x0061c744 from 22 to 127 entries, and EventHandlerSlotPool at 0x005d7b07 from 20 to 128 entries to eliminate memory allocation halts:
    if (memory->writable(0x0061c744u, 1)) {
        uint8_t* pSlot = static_cast<uint8_t*>(ptr(0x0061c744u, 1));
        if (pSlot && *pSlot == 0x16) *pSlot = 0x7f;
    }
  • Heap Pointer Tagging Fix (Android 11+): Configured android:taggedPointerMode="never" in AndroidManifest.xml to prevent ARM64 pointer tagging corruption on guest 32-bit addresses:
    <application
        android:taggedPointerMode="never"
        ... />
  • Fix Front-End Loading Stall on Mali GPUs: Resolved front-end menu loading stalls and event synchronization bottlenecks on Mali-based devices and systems with delayed event queues (#25, #26).

Touch Controls & UI Performance

  • Touch Button Opacity Slider (#38): Added an on-screen opacity slider (10% to 100%) in RacingControlsView for customizable touch button transparency, saved persistently across sessions.
  • Zero-Lag Opacity Rendering: Eliminated offscreen composition overhead (canvas.saveLayerAlpha) by directly modulating paint alpha channel (applyAlpha()), preventing FPS drops:
    private int applyAlpha(int color) {
        int baseAlpha = (color >>> 24);
        int combinedAlpha = Math.round(baseAlpha * (buttonOpacity / 100f));
        return (color & 0x00FFFFFF) | (combinedAlpha << 24);
    }
  • Draggable Settings Toolbar: Added a draggable handle container using Material Symbols / Google Icons hamburger handle ([ ☰ ]), allowing players to reposition the settings card anywhere on screen to customize underlying buttons without obstruction:
    if (dragButtonRect.contains(x, y)) {
        isDraggingSettings = true;
        dragStartX = x;
        dragStartY = y;
        dragInitialOffsetX = settingsOffsetX;
        dragInitialOffsetY = settingsOffsetY;
    }

OS Refresh Rate Optimization

  • Dynamic Display Refresh Rate: Added android:appCategory="game" and dynamic display refresh rate attribute configuration to prevent custom OS skins (HyperOS, MIUI, OxygenOS) from dropping the refresh rate to 60Hz or stuttering when closing system panels:
    try {
        java.lang.reflect.Field minField = android.view.WindowManager.LayoutParams.class.getField("preferredMinDisplayRefreshRate");
        java.lang.reflect.Field maxField = android.view.WindowManager.LayoutParams.class.getField("preferredMaxDisplayRefreshRate");
        minField.setFloat(windowParams, (float) targetFps);
        maxField.setFloat(windowParams, (float) targetFps);
    } catch (Throwable ignored) {}
  • OS Stutter Troubleshooting Guide: Added readme_os_lag.md with step-by-step setup and tuning tips for HyperOS and high-refresh-rate devices.

Full Changelog: v0.15.15...v0.15.16