Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion emscripten/pre.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const render360LogTail = []
// Errors and font/audio lines, kept apart so a long run cannot push them out
// of the 40-line tail before anyone copies diagnostics.
const RENDER360_NOTABLE_KEY = 'render360-ios-notable-v1'
const RENDER360_NOTABLE_RE = /font|error|fail|couldn'?t|cannot|can't|unable|missing|not found|warning|audio|sound/i
const RENDER360_NOTABLE_RE = /font|error|fail|couldn'?t|cannot|can't|unable|missing|not found|warning|audio|sound|Render360 video/i
const render360Notable = []
let render360LogTailDirty = false
function render360RememberLine(text) {
Expand Down
16 changes: 16 additions & 0 deletions engine/sys_getmodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,19 @@ int CVideoMode_Common::FindVideoMode( int nDesiredWidth, int nDesiredHeight, boo

#endif // USE_SDL

#ifdef __EMSCRIPTEN__
// The browser canvas can be any size; there is no display mode list to
// snap to. Snapping sent the game to mode 0 (640x480), which the page then
// stretched across a 2.16:1 iPhone screen: zoomed, squashed 3D and huge
// menu text. Always use exactly the size that was asked for.
if ( nDesiredWidth > 0 && nDesiredHeight > 0 )
{
RequestedWindowVideoMode().width = nDesiredWidth;
RequestedWindowVideoMode().height = nDesiredHeight;
return VIDEO_MODE_REQUESTED_WINDOW_SIZE;
}
#endif

// Check the default window size..
if ( ( nDesiredWidth == DefaultVideoMode().width) && (nDesiredHeight == DefaultVideoMode().height) )
return VIDEO_MODE_DEFAULT;
Expand Down Expand Up @@ -528,6 +541,9 @@ void CVideoMode_Common::ResetCurrentModeForNewResolution( int nWidth, int nHeigh
m_nUIHeight = pMode->height;
m_nStereoWidth = pMode->width;
m_nStereoHeight = pMode->height;
#ifdef __EMSCRIPTEN__
Msg( "[Render360 video] mode %dx%d (asked %dx%d, windowed=%d)\n", m_nModeWidth, m_nModeHeight, nWidth, nHeight, bWindowed ? 1 : 0 );
#endif

// assume we won't be overriding the position
m_bVROverride = false;
Expand Down
Loading