mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 09:55:35 +00:00
Fixed bug 3741 - more compatible initializers for arrays
Ozkan Sezer An array defined like int xPositions[] = {-1, 0, 1, w-1, w, w+1 }; errors with Open Watcom: it strictly wants constants. Small patch like below makes things more compatible.
This commit is contained in:
parent
93a520b385
commit
2da830a909
|
@ -447,11 +447,23 @@ mouse_warpMouseInWindow(void *arg)
|
||||||
{
|
{
|
||||||
const int w = MOUSE_TESTWINDOW_WIDTH, h = MOUSE_TESTWINDOW_HEIGHT;
|
const int w = MOUSE_TESTWINDOW_WIDTH, h = MOUSE_TESTWINDOW_HEIGHT;
|
||||||
int numPositions = 6;
|
int numPositions = 6;
|
||||||
int xPositions[] = {-1, 0, 1, w-1, w, w+1 };
|
int xPositions[6];
|
||||||
int yPositions[] = {-1, 0, 1, h-1, h, h+1 };
|
int yPositions[6];
|
||||||
int x, y, i, j;
|
int x, y, i, j;
|
||||||
SDL_Window *window;
|
SDL_Window *window;
|
||||||
|
|
||||||
|
xPositions[0] = -1;
|
||||||
|
xPositions[1] = 0;
|
||||||
|
xPositions[2] = 1;
|
||||||
|
xPositions[3] = w-1;
|
||||||
|
xPositions[4] = w;
|
||||||
|
xPositions[5] = w+1;
|
||||||
|
yPositions[0] = -1;
|
||||||
|
yPositions[1] = 0;
|
||||||
|
yPositions[2] = 1;
|
||||||
|
yPositions[3] = h-1;
|
||||||
|
yPositions[4] = h;
|
||||||
|
yPositions[5] = h+1;
|
||||||
/* Create test window */
|
/* Create test window */
|
||||||
window = _createMouseSuiteTestWindow();
|
window = _createMouseSuiteTestWindow();
|
||||||
if (window == NULL) return TEST_ABORTED;
|
if (window == NULL) return TEST_ABORTED;
|
||||||
|
|
|
@ -46,12 +46,13 @@ button_messagebox(void *eventNumber)
|
||||||
"Custom MessageBox",
|
"Custom MessageBox",
|
||||||
"This is a custom messagebox",
|
"This is a custom messagebox",
|
||||||
2,
|
2,
|
||||||
buttons,
|
NULL,/* buttons */
|
||||||
NULL /* Default color scheme */
|
NULL /* Default color scheme */
|
||||||
};
|
};
|
||||||
|
|
||||||
int button = -1;
|
int button = -1;
|
||||||
int success = 0;
|
int success = 0;
|
||||||
|
data.buttons = buttons;
|
||||||
if (eventNumber) {
|
if (eventNumber) {
|
||||||
data.message = "This is a custom messagebox from a background thread.";
|
data.message = "This is a custom messagebox from a background thread.";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue