mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 12:36:51 +03:00
fix several amiga frontend warnings
This commit is contained in:
parent
10930fcbaf
commit
dd96a69573
@ -31,6 +31,8 @@ ifeq ($(SUBTARGET),os3)
|
||||
LDFLAGS += -lamiga -lm
|
||||
endif
|
||||
|
||||
COMMON_WARNFLAGS += -Wno-cast-align
|
||||
|
||||
EXETARGET := NetSurf
|
||||
|
||||
# The filter and target for split messages
|
||||
|
@ -531,10 +531,13 @@ static inline struct BitMap *ami_bitmap_get_generic(struct bitmap *bitmap,
|
||||
}
|
||||
|
||||
ami_bitmap_rgba_to_argb(bitmap);
|
||||
if(bitmap->drawhandle = ObtainDrawHandle(NULL,
|
||||
&rp, scrn->ViewPort.ColorMap,
|
||||
bitmap->drawhandle = ObtainDrawHandle(
|
||||
NULL,
|
||||
&rp,
|
||||
scrn->ViewPort.ColorMap,
|
||||
GGFX_DitherMode, dithermode,
|
||||
TAG_DONE)) {
|
||||
TAG_DONE);
|
||||
if(bitmap->drawhandle) {
|
||||
APTR ddh = CreateDirectDrawHandle(bitmap->drawhandle,
|
||||
bitmap->width, bitmap->height,
|
||||
width, height, NULL);
|
||||
|
@ -68,17 +68,19 @@
|
||||
#include "amiga/utf8.h"
|
||||
|
||||
static void
|
||||
ami_cw_scroller_top(struct ami_corewindow *ami_cw, ULONG *restrict x, ULONG *restrict y)
|
||||
ami_cw_scroller_top(struct ami_corewindow *ami_cw,
|
||||
ULONG *restrict x,
|
||||
ULONG *restrict y)
|
||||
{
|
||||
ULONG xs = 0;
|
||||
ULONG ys = 0;
|
||||
|
||||
if(ami_cw->scroll_x_visible == true) {
|
||||
GetAttr(SCROLLER_Top, ami_cw->objects[GID_CW_HSCROLL], (ULONG *)&xs);
|
||||
GetAttr(SCROLLER_Top, ami_cw->objects[GID_CW_HSCROLL], &xs);
|
||||
}
|
||||
|
||||
if(ami_cw->scroll_y_visible == true) {
|
||||
GetAttr(SCROLLER_Top, ami_cw->objects[GID_CW_VSCROLL], (ULONG *)&ys);
|
||||
GetAttr(SCROLLER_Top, ami_cw->objects[GID_CW_VSCROLL], &ys);
|
||||
}
|
||||
|
||||
*x = xs;
|
||||
@ -243,15 +245,15 @@ ami_cw_redraw_rect(struct ami_corewindow *ami_cw, struct rect *r)
|
||||
|
||||
ami_cw_scroller_top(ami_cw, &pos_x, &pos_y);
|
||||
|
||||
if(x - pos_x + width > bbox->Width) width = bbox->Width - (x - pos_x);
|
||||
if(y - pos_y + height > bbox->Height) height = bbox->Height - (y - pos_y);
|
||||
if(x - (LONG)pos_x + width > bbox->Width) width = bbox->Width - (x - pos_x);
|
||||
if(y - (LONG)pos_y + height > bbox->Height) height = bbox->Height - (y - pos_y);
|
||||
|
||||
if(x < pos_x) {
|
||||
if(x < (LONG)pos_x) {
|
||||
width -= pos_x - x;
|
||||
x = pos_x;
|
||||
}
|
||||
|
||||
if(y < pos_y) {
|
||||
if(y < (LONG)pos_y) {
|
||||
height -= pos_y - y;
|
||||
y = pos_y;
|
||||
}
|
||||
@ -880,9 +882,9 @@ ami_cw_scroll_visible(struct core_window *cw, const struct rect *r)
|
||||
win_y1 = win_y0 + win_h;
|
||||
|
||||
if(r->y1 > win_y1) scrollsety = r->y1 - win_h;
|
||||
if(r->y0 < win_y0) scrollsety = r->y0;
|
||||
if(r->y0 < (LONG)win_y0) scrollsety = r->y0;
|
||||
if(r->x1 > win_x1) scrollsetx = r->x1 - win_w;
|
||||
if(r->x0 < win_x0) scrollsetx = r->x0;
|
||||
if(r->x0 < (LONG)win_x0) scrollsetx = r->x0;
|
||||
|
||||
if(ami_cw->scroll_y_visible == true) {
|
||||
RefreshSetGadgetAttrs((APTR)ami_cw->objects[GID_CW_VSCROLL], ami_cw->win, NULL,
|
||||
|
@ -169,7 +169,9 @@ static nserror amiga_nsfont_width(const plot_font_style_t *fstyle,
|
||||
{
|
||||
*width = ami_font_unicode_width(string, length, fstyle, 0, 0, false);
|
||||
|
||||
if(*width <= 0) *width == length; // fudge
|
||||
if(*width <= 0) {
|
||||
*width = length; /* fudge */
|
||||
}
|
||||
|
||||
return NSERROR_OK;
|
||||
}
|
||||
|
@ -783,7 +783,6 @@ static void ami_amiupdate(void)
|
||||
static nsurl *gui_get_resource_url(const char *path)
|
||||
{
|
||||
char buf[1024];
|
||||
char path2[1024];
|
||||
nsurl *url = NULL;
|
||||
|
||||
if(ami_locate_resource(buf, path) == false)
|
||||
|
@ -16,8 +16,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef AMIGA_HISTORY_GLOBAL_H
|
||||
#define AMIGA_HISTORY_GLOBAL_H
|
||||
#ifndef AMIGA_HISTORY_LOCAL_H
|
||||
#define AMIGA_HISTORY_LOCAL_H
|
||||
|
||||
struct gui_window;
|
||||
struct ami_history_local_window;
|
||||
|
Loading…
Reference in New Issue
Block a user