aboutsummaryrefslogtreecommitdiff
path: root/utils.h
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2022-04-08 02:17:46 +0200
committerJavier <dev.git@javispedro.com>2022-04-08 02:17:46 +0200
commit98a343355c3459b892792585788069bac3bc40e7 (patch)
tree1ff4674815775c323822e03c3c0f05c49204a549 /utils.h
parentdb308ca65b8f0ddb61969e7e4b4fb2145d8a27c2 (diff)
downloadvbados-98a343355c3459b892792585788069bac3bc40e7.tar.gz
vbados-98a343355c3459b892792585788069bac3bc40e7.zip
try to detect video mode changes
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/utils.h b/utils.h
index 6cc74da..05b4e36 100644
--- a/utils.h
+++ b/utils.h
@@ -14,6 +14,9 @@ static inline void breakpoint(void);
static inline __segment get_cs(void);
#pragma aux get_cs = "mov ax, cs" value [ax] modify exact [];
+static inline __segment get_ds(void);
+#pragma aux get_ds = "mov ax, ds" value [ax] modify exact [];
+
/** Map x linearly from range [0, srcmax] to [0, dstmax].
* Equivalent of (x * dstmax) / srcmax but with 32-bit unsigned precision. */
static unsigned scaleu(unsigned x, unsigned srcmax, unsigned dstmax);