Compare commits
3 commits
506a6c303e
...
e032f8d54b
| Author | SHA1 | Date | |
|---|---|---|---|
| e032f8d54b | |||
| d785efc708 | |||
| 0ecc33cc29 |
2 changed files with 5 additions and 1 deletions
|
|
@ -72,6 +72,9 @@ namespace psemek::sdl2
|
||||||
if (!window_)
|
if (!window_)
|
||||||
sdl2::fail("Failed to create window: ");
|
sdl2::fail("Failed to create window: ");
|
||||||
|
|
||||||
|
SDL_GetWindowSize(window_, &display_mode.w, &display_mode.h);
|
||||||
|
log::info() << "Created SDL2 window " << display_mode.w << 'x' << display_mode.h;
|
||||||
|
|
||||||
#if defined(PSEMEK_GRAPHICS_API_OPENGL)
|
#if defined(PSEMEK_GRAPHICS_API_OPENGL)
|
||||||
gl_context_ = SDL_GL_CreateContext(window_);
|
gl_context_ = SDL_GL_CreateContext(window_);
|
||||||
if (!gl_context_)
|
if (!gl_context_)
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<style>
|
<style>
|
||||||
body { margin: 0; padding: 0; }
|
html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; }
|
||||||
canvas { display: block; width: 100%; height: 100%; }
|
canvas { display: block; width: 100%; height: 100%; }
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var Module = {
|
var Module = {
|
||||||
canvas: document.getElementById('canvas'),
|
canvas: document.getElementById('canvas'),
|
||||||
|
noImageDecoding: true,
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
{{{ SCRIPT }}}
|
{{{ SCRIPT }}}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue