mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-10-05 21:28:22 +03:00
Fix compiler warnings on Windows
On Windows, jpeglib.h includes windows.h which defines several macros that conflict with ours.
This commit is contained in:
@@ -21,10 +21,13 @@
|
||||
*/
|
||||
/* $Id: jpeg2surface.c,v 1.2 2003/11/09 15:06:12 chikama Exp $ */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <jpeglib.h>
|
||||
#undef ERROR
|
||||
#undef max
|
||||
#undef min
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "portab.h"
|
||||
#include "ags.h"
|
||||
|
||||
@@ -33,19 +33,19 @@
|
||||
|
||||
|
||||
/* マウスカーソルの種類 */
|
||||
#define IDC_ARROW 1
|
||||
#define IDC_CROSS 2
|
||||
#define IDC_IBEAM 3
|
||||
#define IDC_ICON 4
|
||||
#define IDC_NO 5
|
||||
#define IDC_SIZE 6
|
||||
#define IDC_SIZEALL 7
|
||||
#define IDC_SIZENESW 8
|
||||
#define IDC_SIZENS 9
|
||||
#define IDC_SIZENWSE 10
|
||||
#define IDC_SIZEWE 11
|
||||
#define IDC_UPARROW 12
|
||||
#define IDC_WAIT 13
|
||||
#define CURSOR_ARROW 1
|
||||
#define CURSOR_CROSS 2
|
||||
#define CURSOR_IBEAM 3
|
||||
#define CURSOR_ICON 4
|
||||
#define CURSOR_NO 5
|
||||
#define CURSOR_SIZE 6
|
||||
#define CURSOR_SIZEALL 7
|
||||
#define CURSOR_SIZENESW 8
|
||||
#define CURSOR_SIZENS 9
|
||||
#define CURSOR_SIZENWSE 10
|
||||
#define CURSOR_SIZEWE 11
|
||||
#define CURSOR_UPARROW 12
|
||||
#define CURSOR_WAIT 13
|
||||
|
||||
/* RGB <-> alpha plane copy type */
|
||||
typedef enum {
|
||||
|
||||
+5
-2
@@ -17,11 +17,14 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <jpeglib.h>
|
||||
#undef ERROR
|
||||
#undef max
|
||||
#undef min
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "system.h"
|
||||
#include "ags.h"
|
||||
|
||||
+12
-12
@@ -82,18 +82,18 @@ static SDL_Cursor *init_system_cursor(const char *image[]) {
|
||||
|
||||
/* mouse cursur の初期化 */
|
||||
void sdl_cursor_init(void) {
|
||||
cursor[IDC_ARROW] = init_system_cursor(cursor_arrow);
|
||||
cursor[IDC_CROSS] = init_system_cursor(cursor_cross);
|
||||
cursor[IDC_IBEAM] = init_system_cursor(cursor_ibeam);
|
||||
cursor[IDC_NO] = init_system_cursor(cursor_no);
|
||||
cursor[IDC_SIZE] = init_system_cursor(cursor_move);
|
||||
cursor[IDC_SIZEALL] = init_system_cursor(cursor_move);
|
||||
cursor[IDC_SIZENESW] = init_system_cursor(cursor_size_r);
|
||||
cursor[IDC_SIZENS] = init_system_cursor(cursor_size_v);
|
||||
cursor[IDC_SIZENWSE] = init_system_cursor(cursor_size_l);
|
||||
cursor[IDC_SIZEWE] = init_system_cursor(cursor_size_h);
|
||||
cursor[IDC_UPARROW] = init_system_cursor(cursor_uparrow);
|
||||
cursor[IDC_WAIT] = init_system_cursor(cursor_busy);
|
||||
cursor[CURSOR_ARROW] = init_system_cursor(cursor_arrow);
|
||||
cursor[CURSOR_CROSS] = init_system_cursor(cursor_cross);
|
||||
cursor[CURSOR_IBEAM] = init_system_cursor(cursor_ibeam);
|
||||
cursor[CURSOR_NO] = init_system_cursor(cursor_no);
|
||||
cursor[CURSOR_SIZE] = init_system_cursor(cursor_move);
|
||||
cursor[CURSOR_SIZEALL] = init_system_cursor(cursor_move);
|
||||
cursor[CURSOR_SIZENESW] = init_system_cursor(cursor_size_r);
|
||||
cursor[CURSOR_SIZENS] = init_system_cursor(cursor_size_v);
|
||||
cursor[CURSOR_SIZENWSE] = init_system_cursor(cursor_size_l);
|
||||
cursor[CURSOR_SIZEWE] = init_system_cursor(cursor_size_h);
|
||||
cursor[CURSOR_UPARROW] = init_system_cursor(cursor_uparrow);
|
||||
cursor[CURSOR_WAIT] = init_system_cursor(cursor_busy);
|
||||
}
|
||||
|
||||
boolean sdl_cursorNew(BYTE* data, int no, CursorImage *cursorImage, TCursorDirEntry *cursordirentry) {
|
||||
|
||||
+13
-13
@@ -97,25 +97,25 @@ void x11_init_cursor(void) {
|
||||
maskPix[6] = XCreateBitmapFromData(x11_display, x11_window, maskbm6_bits,
|
||||
maskbm6_width, maskbm6_height);
|
||||
|
||||
cursor[IDC_ARROW] = XCreatePixmapCursor(x11_display, curPix[0], maskPix[0],
|
||||
cursor[CURSOR_ARROW] = XCreatePixmapCursor(x11_display, curPix[0], maskPix[0],
|
||||
&black, &white, spot[0].x, spot[0].y);
|
||||
cursor[IDC_CROSS] = XCreateFontCursor(x11_display, XC_tcross);
|
||||
cursor[IDC_IBEAM] = cursor[IDC_ICON] = XCreateFontCursor(x11_display, XC_icon);
|
||||
cursor[IDC_NO] = XCreateFontCursor(x11_display, XC_X_cursor);
|
||||
cursor[IDC_SIZE] = XCreatePixmapCursor(x11_display, curPix[6], maskPix[6],
|
||||
cursor[CURSOR_CROSS] = XCreateFontCursor(x11_display, XC_tcross);
|
||||
cursor[CURSOR_IBEAM] = cursor[CURSOR_ICON] = XCreateFontCursor(x11_display, XC_icon);
|
||||
cursor[CURSOR_NO] = XCreateFontCursor(x11_display, XC_X_cursor);
|
||||
cursor[CURSOR_SIZE] = XCreatePixmapCursor(x11_display, curPix[6], maskPix[6],
|
||||
&black, &white, spot[6].x, spot[6].y);
|
||||
cursor[IDC_SIZEALL] = cursor[IDC_SIZE];
|
||||
cursor[IDC_SIZENESW] = XCreatePixmapCursor(x11_display, curPix[4], maskPix[4],
|
||||
cursor[CURSOR_SIZEALL] = cursor[CURSOR_SIZE];
|
||||
cursor[CURSOR_SIZENESW] = XCreatePixmapCursor(x11_display, curPix[4], maskPix[4],
|
||||
&black, &white, spot[4].x, spot[4].y);
|
||||
cursor[IDC_SIZENS] = XCreatePixmapCursor(x11_display, curPix[2], maskPix[2],
|
||||
cursor[CURSOR_SIZENS] = XCreatePixmapCursor(x11_display, curPix[2], maskPix[2],
|
||||
&black, &white, spot[2].x, spot[2].y);
|
||||
cursor[IDC_SIZENWSE] = XCreatePixmapCursor(x11_display, curPix[3], maskPix[3],
|
||||
cursor[CURSOR_SIZENWSE] = XCreatePixmapCursor(x11_display, curPix[3], maskPix[3],
|
||||
&black, &white, spot[3].x, spot[3].y);
|
||||
cursor[IDC_SIZEWE] = XCreatePixmapCursor(x11_display, curPix[1], maskPix[1],
|
||||
cursor[CURSOR_SIZEWE] = XCreatePixmapCursor(x11_display, curPix[1], maskPix[1],
|
||||
&black, &white, spot[1].x, spot[1].y);
|
||||
cursor[IDC_UPARROW] = XCreateFontCursor(x11_display, XC_sb_up_arrow);
|
||||
// cursor[IDC_WAIT] = XCreateFontCursor(x11_display, XC_watch);
|
||||
cursor[IDC_WAIT] = XCreatePixmapCursor(x11_display, curPix[5], maskPix[5],
|
||||
cursor[CURSOR_UPARROW] = XCreateFontCursor(x11_display, XC_sb_up_arrow);
|
||||
// cursor[CURSOR_WAIT] = XCreateFontCursor(x11_display, XC_watch);
|
||||
cursor[CURSOR_WAIT] = XCreatePixmapCursor(x11_display, curPix[5], maskPix[5],
|
||||
&black, &white, spot[5].x, spot[5].y);
|
||||
|
||||
if ((tmpPixmap = XCreatePixmap(x11_display,x11_window, 1, 1, 1)))
|
||||
|
||||
Reference in New Issue
Block a user