1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-01-17 04:48:57 +01:00

minor fixes

This commit is contained in:
XProger 2022-11-26 01:28:52 +03:00
parent 119f47aa0a
commit 1de9bbdbdb
6 changed files with 20 additions and 17 deletions

View File

@ -1371,7 +1371,7 @@ namespace Core {
void endFrame() {
if (active.target != defaultTarget) {
GAPI::setTarget(NULL, NULL, 0);
setTarget(NULL, NULL, 0);
validateRenderState();
}
GAPI::endFrame();

View File

@ -10,6 +10,7 @@
body {
margin: 0px;
font-size: 1.0em;
touch-action: none;
}
.game_fs {
position: fixed;
@ -32,7 +33,9 @@
</style>
<meta charset="utf-8">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=854, user-scalable=no">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="viewport-fit=cover, user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1">
<!--<meta name="viewport" content="width=854, user-scalable=no">-->
</head>
<body>
<button id="goFS">Go fullscreen</button>
@ -221,7 +224,7 @@
// return "Really want to quit the game?";
//};
var isMobile = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);
var isMobile = !!navigator.platform && (/iPad|iPhone|iPod/.test(navigator.platform) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1));
if (isMobile) {
canvasElement.className = "game_fs";

View File

@ -13,6 +13,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerWorkingDirectory>..\..\..\bin\TR1_PSX</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommandArguments>PSXDATA/GYM.PSX</LocalDebuggerCommandArguments>
<LocalDebuggerCommandArguments>
</LocalDebuggerCommandArguments>
</PropertyGroup>
</Project>

View File

@ -162,7 +162,6 @@ void joyInit() {
for (int j = 0; j < INPUT_JOY_COUNT; j++) {
if (_XInputGetState) { // XInput
XINPUT_STATE state;
int res = _XInputGetState(j, &state);
joyDevice[j].ready = (_XInputGetState(j, &state) == ERROR_SUCCESS);
} else { // mmSystem (legacy)
JOYINFOEX info;

View File

@ -510,10 +510,10 @@ namespace Sound {
void resample(Frame *frames, short value) {
predicate(value);
frames[0].L = frames[0].R = s2 + (s1 - s2) / 4; // 0.25
frames[1].L = frames[1].R = s2 + (s1 - s2) / 2; // 0.50
frames[2].L = frames[2].R = s2 + (s1 - s2) * 3 / 4; // 0.75
frames[3].L = frames[3].R = s1; // 1.00
frames[0].L = frames[0].R = s2 + (s1 - s2) / 4; // 0.25
frames[1].L = frames[1].R = s2 + (s1 - s2) / 2; // 0.50
frames[2].L = frames[2].R = s1 - (s1 - s2) / 4; // 0.75
frames[3].L = frames[3].R = s1; // 1.00
}
int processBlock() {

View File

@ -2405,17 +2405,17 @@ struct BitStream {
BitStream(uint8 *data, int size) : data(data), end(data + size), index(0), value(0) {}
inline uint32 readBit() {
uint32 bit;
uint32 bit;
if (!index--) {
value = *data++;
index = 7;
}
if (!index--) {
value = *data++;
index = 7;
}
bit = value & 1;
value >>= 1;
bit = value & 1;
value >>= 1;
return bit;
return bit;
}
uint32 read(int count) {