Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac GUI: don't show /dev/poll/cdrom if it is configured as cdrom #163

Merged
merged 11 commits into from
Feb 25, 2018

Conversation

atmaxinger
Copy link
Contributor

This should fix #149.

It will still show the /dev/poll/cdrom entries if they are not configured as cdrom, so that the user can remove those entries.

[disk setPath:[NSString stringWithUTF8String: dsk ]];
[disk setIsCDROM:YES];
NSString *path = [NSString stringWithUTF8String: dsk ];
if (![path hasPrefix:@"/dev/"]) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your indentation doesn't seem to be consistent with the rest of the file. Could you please make it consistent?


// Remove all cdroms (but keep the ones in /dev/)
const char *path;
int index=0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: spaces around =

if(![p hasPrefix:@"/dev/"]) {
PrefsRemoveItem("cdrom", index);
}
else {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Combine with previous line.

int index=0;
while ((path = PrefsFindString("cdrom", index)) != NULL) {
NSString *p = [NSString stringWithUTF8String: path];
if(![p hasPrefix:@"/dev/"]) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Space after if

@atmaxinger
Copy link
Contributor Author

I have fixed the formatting.

const char *path;
int index = 0;
while ((path = PrefsFindString("cdrom", index)) != NULL) {
NSString *p = [NSString stringWithUTF8String: path];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Indent for this line is still off.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@asvitkine asvitkine merged commit 2e302d6 into cebix:master Feb 25, 2018
rakslice pushed a commit to rakslice/macemu that referenced this pull request Oct 16, 2020
Mac GUI: don't show /dev/poll/cdrom if it is configured as cdrom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants