mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-01-31 18:53:03 +00:00
Minor fixes.
This commit is contained in:
parent
cfbc3dbbaa
commit
97ea3356a9
@ -376,9 +376,15 @@ public class NativeActivity extends Activity {
|
|||||||
audioPlayer = null;
|
audioPlayer = null;
|
||||||
mGLSurfaceView = null;
|
mGLSurfaceView = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean overrideKeys() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||||
|
if (!overrideKeys())
|
||||||
|
return false;
|
||||||
// Eat these keys, to avoid accidental exits / other screwups.
|
// Eat these keys, to avoid accidental exits / other screwups.
|
||||||
// Maybe there's even more we need to eat on tablets?
|
// Maybe there's even more we need to eat on tablets?
|
||||||
if (keyCode == KeyEvent.KEYCODE_BACK) {
|
if (keyCode == KeyEvent.KEYCODE_BACK) {
|
||||||
|
@ -280,8 +280,8 @@ void DrawBuffer::MeasureText(int font, const char *text, float *w, float *h) {
|
|||||||
AtlasChar c = atlasfont.chars[cval - 32];
|
AtlasChar c = atlasfont.chars[cval - 32];
|
||||||
wacc += c.wx * fontscalex;
|
wacc += c.wx * fontscalex;
|
||||||
}
|
}
|
||||||
*w = wacc;
|
if (w) *w = wacc;
|
||||||
*h = atlasfont.height * fontscaley * lines;
|
if (h) *h = atlasfont.height * fontscaley * lines;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrawBuffer::DrawTextShadow(int font, const char *text, float x, float y, Color color, int flags) {
|
void DrawBuffer::DrawTextShadow(int font, const char *text, float x, float y, Color color, int flags) {
|
||||||
|
2
ui/ui.h
2
ui/ui.h
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#include "gfx_es2/draw_buffer.h"
|
#include "gfx_es2/draw_buffer.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string >
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
// Mouse out of habit, applies just as well to touch events.
|
// Mouse out of habit, applies just as well to touch events.
|
||||||
|
@ -25,4 +25,18 @@ inline uint32 ComputeParity(uint32 v) {
|
|||||||
|
|
||||||
} // namespace bits
|
} // namespace bits
|
||||||
|
|
||||||
|
#ifndef _MSC_VER
|
||||||
|
|
||||||
|
// These are built-ins in MSVC, let's define them for other OS:es as well.
|
||||||
|
|
||||||
|
inline uint32_t _rotl(uint32_t val, int shift) {
|
||||||
|
return (val << shift) | (val >> (31 - shift));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline uint32_t _rotr(uint32_t val, int shift) {
|
||||||
|
return (val << shift) | (val >> (31 - shift));
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user