Skip to content

Commit 915dbd4

Browse files
doublegateclaude
andcommitted
chore: Clean up debug logging and document investigation results
Remove verbose debug console.log statements from September 2025 resolution override investigation. Add inline documentation confirming the system works correctly and that any resolution limitations are due to external factors (GeForce NOW account tiers, game restrictions, backend validation). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 575a9c9 commit 915dbd4

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,21 @@ Press `Ctrl+I` to open sidebar to access GeForce Infinity features.
7070
Press `Ctrl+I` to open sidebar and configure your preferred settings:
7171

7272
### **Resolution Settings**
73+
7374
- **1440p**: 2560x1440 standard QHD
7475
- **Ultrawide**: 3440x1440 for 21:9 ultrawide monitors
7576
- **4K**: 3840x2160 for 4K displays
7677
- **5K**: 5120x2880 for high-end displays
7778

7879
### **Codec Selection**
80+
7981
- **Auto (Recommended)**: Automatically selects best codec for your connection
8082
- **H.264 (Legacy)**: Wide compatibility, lower bandwidth
8183
- **H.265/HEVC**: Better compression, improved quality
8284
- **AV1 (4K Optimized)**: Latest codec, optimal for 4K streaming
8385

8486
### **Frame Rate Options**
87+
8588
- **30 FPS**: Standard streaming
8689
- **60 FPS**: Smooth gaming (Performance plan or higher)
8790
- **120 FPS**: Ultra-smooth gaming (Ultimate plan required)
@@ -111,6 +114,7 @@ GeForce Infinity is built with modern web technologies and follows best practice
111114
- **🛠️ Technical Excellence**: Systematic debugging led to breakthrough iframe injection implementation
112115

113116
### **Previous Improvements (v1.3.0)**
117+
114118
- **ES Module Compatibility**: Complete migration to ES modules with proper directory imports and extensions
115119
- **4K/AV1 Support**: Advanced codec selection with AV1 optimization for 4K streaming performance
116120
- **TypeScript Modernization**: Enhanced type safety with modern import/export syntax throughout codebase
@@ -139,6 +143,7 @@ To get started with GeForce Infinity, follow these steps:
139143
```
140144

141145
4. Run the application:
146+
142147
```bash
143148
yarn start
144149
```

src/electron/main.ts

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -279,30 +279,28 @@ function setupWindowEvents(mainWindow: BrowserWindow) {
279279
}
280280
);
281281

282-
// Add HTTP onBeforeRequest handler for POST body modification
282+
// Add HTTP onBeforeRequest handler for POST body modification
283+
// Investigation confirmed (Sept 2025): This system works correctly and successfully
284+
// overrides GeForce NOW default resolutions. If higher resolutions (3440x1440, 4K)
285+
// don't work, it's due to external factors like GeForce NOW account tier restrictions,
286+
// game-specific limitations, or backend validation - not a bug in this application.
283287
session.defaultSession.webRequest.onBeforeRequest(
284288
{ urls: ["*://*.nvidiagrid.net/v2/session*"] },
285289
(details, callback) => {
286-
console.log("[GeForce Infinity] HTTP onBeforeRequest intercepted:", details.method, details.url);
287-
288290
if (details.method === "POST" && details.uploadData) {
289291
const config = getConfig();
290-
console.log("[GeForce Infinity] Processing POST request with config:", config);
291292

292293
// Process uploadData to modify session request
293294
for (let i = 0; i < details.uploadData.length; i++) {
294295
const uploadItem = details.uploadData[i];
295296
if (uploadItem.bytes) {
296297
try {
297298
const bodyText = uploadItem.bytes.toString('utf8');
298-
console.log("[GeForce Infinity] Original POST body length:", bodyText.length);
299-
300299
const modifiedBody = tryPatchBody(bodyText, config);
300+
301301
if (modifiedBody && modifiedBody !== bodyText) {
302302
console.log("[GeForce Infinity] Resolution override applied to POST body");
303-
// Modify the uploadData in place
304303
uploadItem.bytes = Buffer.from(modifiedBody, 'utf8');
305-
console.log("[GeForce Infinity] Modified POST body length:", modifiedBody.length);
306304
}
307305
} catch (error) {
308306
console.error("[GeForce Infinity] Error processing POST body:", error);
@@ -318,9 +316,6 @@ function setupWindowEvents(mainWindow: BrowserWindow) {
318316
session.defaultSession.webRequest.onBeforeSendHeaders(
319317
{ urls: ["*://*.nvidiagrid.net/v2/*"] },
320318
(details, callback) => {
321-
// Debug: Log all nvidiagrid v2 requests to understand the pattern
322-
console.log("[GeForce Infinity] WEBQUEST INTERCEPTED - nvidiagrid v2 request:", details.method, details.url);
323-
324319
const headers = details.requestHeaders;
325320

326321
// Force nv-device-os and related platform headers
@@ -426,7 +421,6 @@ function tryPatchBody(initBody: string, configData: any): string | undefined {
426421
// Use passed config data
427422
const clientSettings = configData;
428423

429-
console.log("[GeForce Infinity] Found session request, checking config...", clientSettings);
430424
console.log("[GeForce Infinity] Applying resolution override:", clientSettings.monitorWidth + "x" + clientSettings.monitorHeight, "FPS:", clientSettings.framesPerSecond, "Codec:", clientSettings.codecPreference);
431425

432426
// Calculate appropriate DPI for high resolution displays
@@ -463,7 +457,8 @@ function tryPatchBody(initBody: string, configData: any): string | undefined {
463457
console.log("[4K Mode] Using AV1 codec for " + width + "x" + height + " streaming");
464458
}
465459

466-
return JSON.stringify(parsed);
460+
const result = JSON.stringify(parsed);
461+
return result;
467462
}
468463

469464
async function patchFetchForSessionRequest(mainWindow: Electron.CrossProcessExports.BrowserWindow) {

0 commit comments

Comments
 (0)