mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-19 15:25:39 +00:00
(svn r3461) - Fix: Increase window-size as for 64-bit machines it wasn't enough
This commit is contained in:
parent
9f6324d5d8
commit
a902af3fc6
10
window.h
10
window.h
@ -253,12 +253,10 @@ typedef struct querystr_d {
|
|||||||
} querystr_d;
|
} querystr_d;
|
||||||
|
|
||||||
#define WP(ptr,str) (*(str*)(ptr)->custom)
|
#define WP(ptr,str) (*(str*)(ptr)->custom)
|
||||||
// querystr_d is the largest struct that comes in w->custom
|
/* You cannot 100% reliably calculate the biggest custom struct as
|
||||||
// because 64-bit systems use 64-bit pointers, it is bigger on a 64-bit system
|
* the number of pointers in it and alignment will have a huge impact.
|
||||||
// than on a 32-bit system. Therefore, the size is calculated from querystr_d
|
* 88 is the largest window-size for 64-bit machines currently */
|
||||||
// instead of a hardcoded number.
|
#define WINDOW_CUSTOM_SIZE 88
|
||||||
// if any struct becomes bigger the querystr_d, it should be replaced.
|
|
||||||
#define WINDOW_CUSTOM_SIZE sizeof(querystr_d) * 2
|
|
||||||
|
|
||||||
typedef struct Scrollbar {
|
typedef struct Scrollbar {
|
||||||
uint16 count, cap, pos;
|
uint16 count, cap, pos;
|
||||||
|
Loading…
Reference in New Issue
Block a user